Join the Ready, Set, Send Challenge Week 3. Share your QR code or landing page and win a badge!

Getting 401 on a new Access Token only for some users

UpHabitD0
Rookie
0 Votes

On our Application only for a particular user, we get "401" on every API Call.

The code automatically refreshes the token before making the API call if the current token is expired or we get a 401 on response.
This flow works without any issues for most of the users.

To Debug the issue for this specific user:
1. I've refreshed the token and triggered the API calls on our application manually and got 401 again on triggering the flow.
2. To test it outside of our Application,  I've used the user's refresh_token to get a new Access Token using Postman and used the Access token obtained to make the call "https://api.cc.email/v3/contact_tags?status=all" and got 401 again
2.1  I've tried with a different Account and the above case with Postman works just fine for that account

Please contact me directly through email if you need more info about the user / our Application.

I've already read a bunch of posts related to 401 on this forum. out of which only one seemed to be similar and the answer to that one ( token was getting truncated ) does not apply to our scenario as i can reproduce the same issue through Postman and Other CC linked users on our App it's fine


Please Help out figuring this issue out

Below I've attached the calls im making just to not leave any info
1. Request to refresh token

 

curl --location --request POST 'https://authz.constantcontact.com/oauth2/default/v1/token?refresh_token=<Refresh_token_of_the_user>&grant_type=refresh_token' \
--header 'Accept: application/json' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Authorization: Basic <base64 of client_id:secret>' \
--header 'Cookie: JSESSIONID=A611F960F0063135AA0453C9BFD3D99E; __cflb=02DiuGofi2fXZofPX95n9sY7eZTNvCaXx6hKNAYsCdZjr'

 

 2. Request to get user's Tags

 

curl --location --request GET 'https://api.cc.email/v3/contact_tags' \
--header 'Authorization: Bearer <New token obtained from the previous request>'

 

3. response im getting

 

Status code 401

{
    "error_key": "unauthorized",
    "error_message": "Unauthorized"
}

 

 

1 REPLY 1
John__B
Employee
0 Votes

Hello UpHabitD0,

 

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 reached out to you via email regarding this issue to request some additional information in order to better assist with troubleshooting. If you still need assistance with this, please let us know! If you haven't received our reply, please let us know via email at webservices@constantcontact.com, and reference case number 31973245.

 

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

 

Regards,


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