How to avoid expiration of access-token ?

  • 1
  • Article
  • Updated 2 years ago
  • (Edited)
If your app is public app or browser based app, they are automatically enabled for OAuth 2.0 Authorization code flow by mandate. Most of our Public Developer Integrations follow this approach of caching the tokens and using them again to refresh the tokens. This would save you the hassle of having your customers to re-login to the application again. 

For ex: take a look at our JS SDK we have the capability to 

  • Automatically handles token lifecycle procedures in multi-tab environment
Per which all the SDK does is does a platform.refresh() which does the token refresh so that you would get a new pair of access tokens and refresh tokens. The TTL on these tokens is as below: 

Access tokens -> 1 hour

Refresh tokens -> 1 week 

For more information, take a look at our API Ref on “Refreshing Tokens” here:!/%23AuthorizationFlows.html#RefRefreshTokenFlow

This is how we do it in our JS SDK :

Additionally, you could also take a look at our Developer Community Articles here for more information and assist:

Photo of VB

VB, Official Rep

  • 1,510 Points 1k badge 2x thumb

Posted 2 years ago

  • 1

Be the first to post a reply!