cancel
Showing results for 
Search instead for 
Did you mean: 
Constant Contact wants to help you succeed! We’re celebrating our professional service programs on the Constant Contact Community this month and you have a chance to try one of the services for free! Learn more.

401 Unauthorized responses

Occasional Contributor

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
New Member

Re: 401 Unauthorized responses

 
Moderator

Re: 401 Unauthorized responses

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
Occasional Contributor

Re: 401 Unauthorized responses

Hi Jimmy_D,

 

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

 

Thanks very much.