Enter the Share Your Success Sweepstakes 2024 For the Chance to Win Great Prizes!

Receiving http 401 error on API call after generating, refreshing access token

BethC708
Rookie
0 Votes

I'm using the Oauth2 Authorization Code flow.  I have obtained an access token and refresh token and am now trying to GET All Contact Lists. I continue to receive http status code 401, immediately after refreshing the token successfully.

 

I tried adding a new account, removing browser cookies, re-confirmed the access, generated new tokens and still receive the 401 error when issuing an API Get/Post immediately after the token access is granted and refreshed.

 

I am out of ideas at this point.  

 

Sample Access Token Response:

{

            "token_type": "Bearer",

            "expires_in": 86400,

            "access_token": [removed],

            "scope": "account_read offline_access account_update campaign_data contact_data",

            "refresh_token": [removed]

}

 

Sample GET URL:

https://api.cc.email/v3/contact_lists?include_count=true&include_membership_count=all

 

Bearer value Submitted:

[removed]

Sample GET Response:

{

            "error_key": "unauthorized",

            "error_message": "Unauthorized"

}

2 REPLIES 2
BethC708
Rookie
0 Votes

I am trying to use the Long Lived Refresh Token Option.  Is the Long Lived Refresh Token option supported?

Courtney_E
Moderator
0 Votes

Hello BethC708,

 

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.

 

It looks like we've already followed up with you directly via email, but I wanted to close the loop here as well. If you haven't received our reply, please let us know via email at webservices@constantcontact.com, and reference case number 30674350.

 

Please have a look and let us know if you have any other questions!


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.
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