We all started somewhere! Share your experience on the Get Advice: Let's Get Started Sweepstakes thread and be entered to win a $100 credit on your Constant Contact account.

Issue with OAUTH2 authentication

NickB905
Participant

Issue with OAUTH2 authentication

Greetings,

 

Working on getting the Oauth2 authorization going, and have run into a puzzling issue.  In our code, we allow the user to click a button to authorize access to their Constant Contact account, and the first part works fine.  

 

1. You can click the button and get sent to the Constant Contact authorization page.  

2. After signing in, the options to grant or deny access display properly, with the right API Key name

3. After clicking"Grant access" we get a request back with the code

 

All is well through that point, but then when we turn around and send the request to get a token back, we get an error like this: 

{
  "error": "invalid_grant",
  "error_description": "Invalid verification code: [[the code we got in step 3 above]]"
}

To get the token, we're issuing a get request like this: 

 

https://oauth2.constantcontact.com/oauth2/oauth/token?client_id=OUR_API_KEY&redirect_uri=OUR_REDIREC...

 

Any thoughts on what might be causing this?

 

Thanks!

Nick

 

 

 

 

2 REPLIES 2
NickB178
Participant

OK - nevermind.  This was an issue on our end, which we've resolved. 

Hi,

 

Thank you for the update.  Have a great day.

 

Best Regards,

Shannon W.

API Support Specialist

Developer Portal

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

Visit Page