Followers Are Great, Contacts Are Gold. Create a Free AI-Quiz With Lead Magnet to Share With Your Followers and Own Your Contacts!

Requesting help for invalid grant mystery

TinaI37
Brand Influencer
0 Votes

Hello,

We've been running our code for months. We refresh our token every 6 hours automatically with

oauth2/default/v1/token   grant_type='refresh_token'

Once in an while, something like once a week, we will get a return code of 400 with the error message 

'invalid grant: the refresh token is invalid or expired'.   Then we have to go in and do the Auth by hand to get things working again. 

I've set up logging to make sure we are passing in the token that we previously had received. 

Is it possible for you to look at your logs (I have the time for when it first failed in the last episode), and do you have any suggestions on what I might look for?

Thank you

4 REPLIES 4
TinaI37
Brand Influencer
0 Votes

Hello! Is the any way we can get support trying to understand our problem?  

We basically have to be on alert to go in and re-auth at any time.  This is unworkable because we have to get in touch with the person who has the login to the account every time, which seems to be at least once a week. 

Again, works for most of the time. What are we missing? 

This is for long-time customers of Constant Contact with a substantial account.  Thank you so much.

Courtney_E
Moderator
0 Votes

Hello TinaI37,

 

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

 

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.
user634661
Rookie
0 Votes

I am also facing the same issue, what is the solutions for this?

 

sanithaV3
Employee
0 Votes

Thank you for reaching out to Constant Contact API Developer Support. Our team is here to assist external software developers with questions related to integrating with Constant Contact's API.

 

After reviewing the details, the error you’re seeing may be due to one of the following reasons:

  • The refresh token was already used and a new one was not stored.
  • The application was reauthorized, which generates a new token set and invalidates any previously issued refresh tokens.

Please disconnect and reconnect the integration to resolve the issue.

To prevent issues like in the future, you may consider using long-lived refresh tokens, which do not expire after a single use. However, please note that long-lived tokens are less secure than rotating refresh tokens and should be used with caution depending on your application's security needs.

 

If you have any follow-up questions, please feel free to reach out to us via email webservices@constantcontact.com. The reference case # is 33550150.


Regards,

Sanitha.V
Tier II 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