Receiving a "redirect_uri_mismatch" error when authorizing with OAUTH 2.0

SOLVED
Go to solution
Occasional Participant

Receiving a "redirect_uri_mismatch" error when authorizing with OAUTH 2.0

I'm trying to use OAUTH 2.0 to authenticate/authorize. I'm testing on my local machine, where my application is running and accessible over HTTPS. I'm taken through the authization step, but get an error on the redirect back to my application.

 

To start the process, I'm redirecting the browser to:

 

https://oauth2.constantcontact.com/oauth2/oauth/siteowner/authorize?response_type=code&client_id=MY_...

 

Where MY_API_KEY is my api key.

 

I'm taken to a Constant Contact login page, then to an authorization page, where I can grant access to my application. After clicking the Grant button, I'm taken to:

 

https://localhost/somepath?error=redirect_uri_mismatch&error_description=Invalid%20redirect.

 

Can you tell me what is wrong with the redirect_uri value I'm using?

 

Thanks,

 

Andy

1 ACCEPTED SOLUTION

Hey Andy,

 

I think the issue may be that when you have created your API key you set the URL redirect to a certain point and you are using a different one in your code.  Thus you are receiving an error.  Please check that and let me know as I was able to get my code after matching the two of them.

Ryan Davis
Quality Engineer

View solution in original post

12 REPLIES 12
Developer Portal

View API documentation, code samples, get your API key.

Visit Page