400 Invalid redirect_uri error

SOLVED
Go to solution
WCCGoldenApple
Brand Strategist
0 Votes

I have one website working fine with the V3 API.  I am now setting up another and getting the 400 Invalid redirect_uri error.

 

On authorize I redirect to this URI: https://api.cc.email/v3/idfed?client_id={my_client_id}&response_type=code&redirect_uri=https://www.s... 

 

This redirect returns 302 and comes back with a response header of Location: https://idfed.constantcontact.com/as//authorization.oauth2?pfidpadapterid=ctctOAuth2IdpAdapter&clien...

 

Notice it has a trailing &.  Also notice that the + signs separating the scopes are not URL encoded.  When I passed just the plus signs in the original redirect URL,  the redirected URL returned did not have plus signs but spaces.  Then I encoded them and the redirect URL comes back with plus signs.

 

The browser redirects again and the above URL returns the 400 error.

 

Any ideas of why this is failing?

 

Thanks,

Bruce

1 ACCEPTED SOLUTION
Courtney_E
Employee
0 Votes

Hello Bruce,

 

Thank you for reaching out to Constant Contact API Developer Support. My team is here to assist outside software developers with questions about building into Constant Contact's API.

 

Based on the information provided and the logs I was able to find, I believe the issue is most likely being caused by the Redirect URI in the Authorization Request URL not matching the Redirect URI specified within your new V3 application key. 

 

https://app.constantcontact.com/pages/dma/portal/ (must be logged into account to access link)

 

Please have a look and let us know if you have any other questions! You can also provide additional information securely by reaching out to us via email at webservices@constantcontact.com


Regards,

Courtney E.
Tier II API Support Engineer

Did I answer your question?
If so, please mark my post as an "Accepted Solution" by clicking the Accept as Solution button in the bottom right hand corner of this post.

View solution in original post

2 REPLIES 2
Courtney_E
Employee
0 Votes

Hello Bruce,

 

Thank you for reaching out to Constant Contact API Developer Support. My team is here to assist outside software developers with questions about building into Constant Contact's API.

 

Based on the information provided and the logs I was able to find, I believe the issue is most likely being caused by the Redirect URI in the Authorization Request URL not matching the Redirect URI specified within your new V3 application key. 

 

https://app.constantcontact.com/pages/dma/portal/ (must be logged into account to access link)

 

Please have a look and let us know if you have any other questions! You can also provide additional information securely by reaching out to us via email at webservices@constantcontact.com


Regards,

Courtney E.
Tier II API Support Engineer

Did I answer your question?
If so, please mark my post as an "Accepted Solution" by clicking the Accept as Solution button in the bottom right hand corner of this post.
WCCGoldenApple
Brand Strategist
0 Votes

Yes, that was it.  Someone else set it up and sent me a screen shot, which looked good.  But apparently something was off.

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