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

OAuth2 Authentication

SOLVED
Go to solution
user721369
Campaign Contributor
0 Votes

Hi Developer Team,

     

               I'm trying to integrate zoho crm and constant contact while authenticating constant contact from zoho crm its connected successfully but after 2hours it has expired because of access_token expired.

             i know how to refresh the access_token via api request but the requirement is it need  to 'expires-in'  key in the response of generating access_token url.but in our response we are  only getting access_token,refreh_token and token_type .

constant contact response.PNG

but We want expires-in key with value of access_token expire time.

 

Example response of what we are looking is i have mentioned below

{

"access_token":"shjgyeb738s8s8d8asdasdd9asd",

"refresh_token":"jsytutugusdgf837683js8ed76jww7d7ed7837",

"token_type":"Bearer"

"expires_in": 7200

}

 

Thanks and Regards,

Mageshwari SS

1 ACCEPTED SOLUTION
Caleb_A
Employee
0 Votes

Thank you for reaching out to Constant Contact API Developer Support, my name is Caleb. My team is here to assist outside software developers with questions about building into Constant Contact's API.

 

Currently our V3 API does not include the 'expires_in' property in the response as the access tokens have dynamic lifetimes; the expiration date depends on how long it has been since the token was last used.

 

If the access token is generated but never used, it will have a minimum lifetime of one hour (3,600 seconds). If the access token is used to make API calls, it will expire two hours (7,200 seconds) after the last time it was used. However the maximum lifetime of the access tokens would be 24 hours (86,400 seconds) before it expires and must be refreshed.

 

To prevent the expiration of your access token we recommend that you set two timers when you generate your access token. One timer counts to two hours and the other timer counts to twenty four hours. Restart the two-hour timer every time you make an API call. If either timer ever reaches its end time, use your refresh token to get a new access token. 

 

Making Access Tokens Last Longer:
https://developer.constantcontact.com/api_guide/faqs_manage_applications.html

 


Regards,

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

View solution in original post

1 REPLY 1
Caleb_A
Employee
0 Votes

Thank you for reaching out to Constant Contact API Developer Support, my name is Caleb. My team is here to assist outside software developers with questions about building into Constant Contact's API.

 

Currently our V3 API does not include the 'expires_in' property in the response as the access tokens have dynamic lifetimes; the expiration date depends on how long it has been since the token was last used.

 

If the access token is generated but never used, it will have a minimum lifetime of one hour (3,600 seconds). If the access token is used to make API calls, it will expire two hours (7,200 seconds) after the last time it was used. However the maximum lifetime of the access tokens would be 24 hours (86,400 seconds) before it expires and must be refreshed.

 

To prevent the expiration of your access token we recommend that you set two timers when you generate your access token. One timer counts to two hours and the other timer counts to twenty four hours. Restart the two-hour timer every time you make an API call. If either timer ever reaches its end time, use your refresh token to get a new access token. 

 

Making Access Tokens Last Longer:
https://developer.constantcontact.com/api_guide/faqs_manage_applications.html

 


Regards,

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