Unauthorized response

CatherineL07643
Participant

Unauthorized response

Hello there, 

 

I found a few articles about unauthorized 401 responses but I haven't found a solution for my issue. I was able to make the two different calls to get an access_token with Postman.

 

{
"access_token": "abcdef",
"refresh_token": "abcdef",
"token_type": "Bearer"
}

 

From there, I'm unable to use the API. For example when I'm trying to get the contacts from a list, I obtain the following : 

 
Screen Shot 2021-03-27 at 8.03.42 PM.png
What am I missing? Do you have any advices to fix my issue?

Thanks.
 
1 REPLY 1
Courtney_E
Moderator

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.

 

The formatting of your example looks correct for the GET list membership request.

https://v3.developer.constantcontact.com/api_guide/lists_overview.html#example-request---get-list-me...

 

If you’re getting an error, your token may be expired, as they only stay active for a limited amount of time.

https://developer.constantcontact.com/api_guide/auth_overview.html#tokens

 

I’d recommend refreshing your access token and then using the new token value in your request:

https://v3.developer.constantcontact.com/api_guide/server_flow.html#step-4-exchange-the-authorizatio...


Regards,

Courtney E.
API Support Specialist

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

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

Visit Page