Receiving a "redirect_uri_mismatch" error when authorizing with OAUTH 2.0

SOLVED
Go to solution
AndyP8
Rookie
0 Votes

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
Ryan_D
Employee
0 Votes

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
Resources
Developer Portal

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

Visit Page

Announcements

API Updates

Join our list to be notified of new features and updates to our V3 API.

Sign Up

Polls
How confident are you about the effectiveness of your current marketing strategy?

Top Choice: Not confident at all (83%)