cancel
Showing results for 
Search instead for 
Did you mean: 
Constant Contact wants to help you succeed! We’re celebrating our professional service programs on the Constant Contact Community this month and you have a chance to try one of the services for free! Learn more.

v3.0 What is the best practice for refreshing access tokens?

SOLVED
Highlighted
Occasional Contributor

v3.0 What is the best practice for refreshing access tokens?

What is the best practice for refreshing access tokens?

 

Do I wait until an error is generated?

Do I refresh based on age of access token?

Is it bad to refresh the token before every request?

 

Thoughts?

1 REPLY 1
Moderator

Re: v3.0 What is the best practice for refreshing access tokens?

Hello @DanH069,

 

Thank you for reaching out to Constant Contact's API Support.

 

I would suggest one of the first two options. I personally like to go with option two. I create two timers; one of the timers is set for two hours and the other is set for 24 hours. The two hour timer is reset any time I make an API call. If either timer reaches its end then I will go through the refresh process.


Regards,
Jimmy D.
Tier II API Support Engineer