OAuth refresh token was working, now is not

Description
The token refresh process, working a couple of weeks ago, seems to not work now.

Error
{
“reason”: “Invalid Token!”,
“error”: “invalid_request”
}

Which App Type (OAuth / Chatbot / JWT / Webhook)?
OAuth

Which Endpoint/s?
https://zoom.us/oauth/token

How To Reproduce (If applicable)

  1. Authorize the app.
  2. Request a new access_token using the previous refresh_token after an hour(stored in the database).

Additional context
I’m reauthorizing the app with the same account(revoking the token), as this will be a common scenario for my app, and was working before. Please provide advice on this.

Hi @njrr2021,

If you’re running into an invalid token error, keep in mind that access tokens expire after one hour. Once expired, you will have to refresh a user’s access token. The purpose of the refresh token is to request a new access token. Although the refresh token expires after 15 years, it becomes invalid after it is used to request a new access token. You will receive a new refresh token pair and an access token once you use the old refresh token. You will have to update these old values with new ones.

Typically, these are the most common reasons for such an error:

  1. If a new access token is generated, both the previous access token and refresh token will become invalid. So you will need to update each of these tokens each time you request a new access token.

  2. Another situation that can arise is if multiple requests are sent using the same refresh token within a short amount of time, a race condition may prevent all requests from going through successfully. In this case, if you are not able to update the refresh token at your end (this generally happens when you make multiple requests in a short amount of time), a recommended workaround would be to reauthorize the app.

  3. If a user uninstalls the app by revoking the authentication, the refresh token will become invalid. This may not be a scenario in your case.

Let me know if this helps,
Will

I am having this same issue. The original access_token works for an hour after authentication but as soon as that token is expired and we request a new one like you are doing I get the same error message.

Error
{
“reason”: “Invalid Token!”,
“error”: “invalid_request”
}

Our users have to disable and reenable to get another hour of usage. It is very frustrating.

The most common issues as reported by will.zoom have been ruled out.

Have you made any progress on this issue?

Thanks,
Breet

Hi @breet,

Are you able to share an example token and timestamp with us directly by opening a request here? We can help to further investigate.

Thanks,
Will

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.