401 Unauthorized responses

Regular Participant

401 Unauthorized responses

I'm a developer currently working on a ConstantContact integration. I registered a trial account last month with xxxxxxxxxxxx@gmail.com and everything was going well. My API key was registered with the same email address (xxxxxxxxxx@gmail.com). To test a different email address (like a normal user of the app I'm working on), I created a second trial account with xxxxxxxxxxx@yahoo.com.

 

Now I can't connect with either account. For both email addresses, I get a `401 Unauthorized` response:


{
"error": "invalid_grant",
"error_description": "Invalid verification code: xxxxxxxxxxxxxxx"
}

 

What might be wrong please?

3 REPLIES 3
Participant

 
Moderator

Hello,

 

The error you are receiving occurs when you input an invalid response for the "code" on the oAuth step for Access Token Request. The "code" should be set to the 27 digit number that you received in your response when you submitted the Authorization Request using this endpoint. (https://oauth2.constantcontact.com/oauth2/oauth/siteowner/authorize)

 

Please double check this page for the full steps on setting up oAuth 2.0. (http://developer.constantcontact.com/docs/authentication/oauth-2.0-server-flow.html)

 

If this does not fully answer your question could you please provide some more details? If you need to include details that would require privacy please send an email to webservices@constantcontact.com.


Regards,
Jimmy D.
Tier II API Support Engineer
Regular Participant

Hi Jimmy_D,

 

I've sent an email to you with further details. 

 

Thanks very much.

Developer Portal

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

Visit Page