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 .
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
Solved! Go to Solution.
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
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
Announcements
Join our list to be notified of new features and updates to our V3 API.
Sign Up