Skip to main content
New Participant
April 13, 2021
Question

How to properly refresh the "refresh token"

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()
save_new_refresh_token(res.json().refresh_token)

Thank you so much for your help.

    1 reply

    PhongVu
    Community Manager
    Community Manager
    April 13, 2021

    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.