question

Cancan Gunadi avatar image
Cancan Gunadi asked Phong Vu edited

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.

getting started
1 |3000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

1 Answer

Phong Vu avatar image
Phong Vu answered Phong Vu edited

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.

1 |3000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Developer sandbox tools

Using the RingCentral Phone for Desktop, you can dial or receive test calls, send and receive test SMS or Fax messages in your sandbox environment.

Download RingCentral Phone for Desktop:

Tip: switch to the "sandbox mode" before logging in the app:

  • On MacOS: press "fn + command + f2" keys
  • On Windows: press "Ctrl + F2" keys