How to properly refresh the "refresh token"

  • 13 April 2021
  • 1 reply

Hi @Phong Vu,

We are getting "Refresh Token Expired" errors even when we tried refreshing the "refresh token" before the 7 days expiration of the refresh token.

It seems like when we refresh the refresh token, we get a new refresh token that is different than before but the new "refresh_token_expire_time" is still the same as the old one.

Is this a known problem and how do we fix it?

We use the Python SDK, and here's what our code pretty much looks like:

res = platform.refresh()

Thank you so much for your help.

1 reply

Every time you refresh a token, you will get a new refresh token with new expire time. If you manage the access token yourself, you have to save/store the new refresh token and use it next time you refresh it.

The refresh_token_expire_time is the same because it is the amount of time in secs (604800 secs = 7 days) when the token is valid since the time it was issued.