# How to refresh token if refresh\_token in incorrect

**URL:** <https://devforum.zoom.us/t/how-to-refresh-token-if-refresh-token-in-incorrect/3338>\
**Category:** API and Webhooks\
**Created:** [February 20, 2019, 5:39pm UTC](https://devforum.zoom.us/t/how-to-refresh-token-if-refresh-token-in-incorrect/3338 "2019-02-20T17:39:25Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![romanio](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/romanio/32/300_2.png) [@romanio](https://devforum.zoom.us/u/romanio)\
**Post date:** [February 20, 2019, 5:39pm UTC](https://devforum.zoom.us/t/how-to-refresh-token-if-refresh-token-in-incorrect/3338/1 "2019-02-20T17:39:25Z")

</div>

Hello,

My app properly goes through described process [https://developer.zoom.us/docs/oauth/](https://developer.zoom.us/docs/oauth/), but in some point of time it didn’t handle refresh and store new refresh\_token during few parallel processes.

Could you please let me know how to refresh token if stored refresh\_token is already inactive?

Thanks

---

<div class="post-metadata">

**Author:** ![michael\_p.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/michael_p.zoom/32/18105_2.png) [@michael\_p.zoom](https://devforum.zoom.us/u/michael_p.zoom)\
**Post date:** [February 21, 2019, 4:36pm UTC](https://devforum.zoom.us/t/how-to-refresh-token-if-refresh-token-in-incorrect/3338/2 "2019-02-21T16:36:51Z")

</div>

Hi @romanio,

Refresh tokens have a lifetime of 15 years, you should still be able to use the refresh\_token to get a new access token [0].

0 - [https://marketplace.zoom.us/docs/guides/authorization/oauth-with-zoom#refresh-access-token](https://marketplace.zoom.us/docs/guides/authorization/oauth-with-zoom#refresh-access-token)

Thanks

---

<div class="post-metadata">

**Author:** ![romanio](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/romanio/32/300_2.png) [@romanio](https://devforum.zoom.us/u/romanio)\
**Post date:** [February 22, 2019, 9:32am UTC](https://devforum.zoom.us/t/how-to-refresh-token-if-refresh-token-in-incorrect/3338/3 "2019-02-22T09:32:49Z")

</div>

Hi @michael_p.zoom,

I didn’t manage to store new refresh\_token as documented “Please make sure that you store the new refresh token as well when refreshing the access tokens.”.

So what my app did:

1. Got token and saved token and refresh\_token, let’s call v1
2. In one hour it refreshed token using refresh\_token.v1 and saved token and refresh\_token v2
3. …
4. The app made request to refresh token with refresh\_token.v3 and didn’t manage to save new token and refresh\_token
5. The app going to refresh token but only have refresh\_token.v3, the api respond with error that refresh\_token is invalid.

Can I somehow renew token if I have only refresh\_token.v3 and didn’t manage to save tokens from attempt v4?

Thanks

---

<div class="post-metadata">

**Author:** ![romanio](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/romanio/32/300_2.png) [@romanio](https://devforum.zoom.us/u/romanio)\
**Post date:** [April 3, 2019, 8:49pm UTC](https://devforum.zoom.us/t/how-to-refresh-token-if-refresh-token-in-incorrect/3338/4 "2019-04-03T20:49:55Z")

</div>

Hi @michael_p.zoom,

Can you please help to get new token if last refresh\_token is missed but I have previous before last.

Thanks

---

<div class="post-metadata">

**Author:** ![michael\_p.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/michael_p.zoom/32/18105_2.png) [@michael\_p.zoom](https://devforum.zoom.us/u/michael_p.zoom)\
**Post date:** [April 3, 2019, 10:27pm UTC](https://devforum.zoom.us/t/how-to-refresh-token-if-refresh-token-in-incorrect/3338/5 "2019-04-03T22:27:41Z")

</div>

Hi @romanio,

If you don’t have the refresh token, you will need to re-authenticate to get a new access token along with refresh token.

> **[OAuth with Zoom - Authorization - Documentation](https://marketplace.zoom.us/docs/guides/authorization/oauth-with-zoom#get-authorization-code)**
>
> OAuth with Zoom
> 
> Overview
> 
> OAuth 2.0 is the industry-standard authorization protocol that allows applications to obtain requested access to user account...

Thanks

---

<div class="post-metadata">

**Author:** ![katyle](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/katyle/32/1098_2.png) [@katyle](https://devforum.zoom.us/u/katyle)\
**Post date:** [July 18, 2019, 11:08pm UTC](https://devforum.zoom.us/t/how-to-refresh-token-if-refresh-token-in-incorrect/3338/6 "2019-07-18T23:08:42Z")

</div>

Is there no other way to get a valid refresh token? Our application is a back-end application that retrieves data for multiple tenants/Zoom accounts. It is not always an option to ask the customer to re-authorize our application for data extraction. I’ve got the most recent first time access code (code = xxxx from redirect). But, I can’t even use that first time access code to re-request the first time access token. The Zoom auth server tells me that even the first time code value is invalid. Summary: access token is expired, Refresh token is invalid and first time access code is invalid. So, if we have an issue saving the latest refresh token, then we are dead in the water? Seems harsh for multi-tenant/account applications.

---

<div class="post-metadata">

**Author:** ![michael\_p.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/michael_p.zoom/32/18105_2.png) [@michael\_p.zoom](https://devforum.zoom.us/u/michael_p.zoom)\
**Post date:** [July 19, 2019, 7:07pm UTC](https://devforum.zoom.us/t/how-to-refresh-token-if-refresh-token-in-incorrect/3338/8 "2019-07-19T19:07:48Z")

</div>

Hi @katyle,

Right now the only way to get the refresh token is to have the user re-authenticate the app. The most recent access code can only be used to retrieve it’s respective access and refresh tokens and not the previous ones. Refresh tokens has a expiration date of 15 years and the only way they are invalid is if there was another access & refresh token generated afterwards.

Is there a reason why the most recent refresh token was not saved?

Thanks

---

<div class="post-metadata">

**Author:** ![katyle](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/katyle/32/1098_2.png) [@katyle](https://devforum.zoom.us/u/katyle)\
**Post date:** [July 19, 2019, 9:39pm UTC](https://devforum.zoom.us/t/how-to-refresh-token-if-refresh-token-in-incorrect/3338/9 "2019-07-19T21:39:53Z")

</div>

A new access token and refresh token were saved in Key Vault at around 9:44 PM on the 17th, Pacific time. But, this token was giving us an odd error when we tried to use it to authenticate with. I then tried “rolling back” to the previous access token and  
refresh token, since Azure Key Vault saves versions of secrets. But, this token was, of course, already expired. Do you want me to send the access token and refresh token that was giving us the odd error?

Katy

This message (including any attachments) contains confidential information and is for the sole use of the intended recipient. If you believe that you have received this email in error, please destroy it and notify the sender immediately.

---

<div class="post-metadata">

**Author:** ![michael\_p.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/michael_p.zoom/32/18105_2.png) [@michael\_p.zoom](https://devforum.zoom.us/u/michael_p.zoom)\
**Post date:** [July 19, 2019, 11:51pm UTC](https://devforum.zoom.us/t/how-to-refresh-token-if-refresh-token-in-incorrect/3338/10 "2019-07-19T23:51:05Z")

</div>

Hi @katyle,

Sure, you can send us the information to [developersupport@zoom.us](mailto:developersupport@zoom.us) and we’ll take a look.

Thanks

---

<div class="post-metadata">

**Author:** ![katyle](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/katyle/32/1098_2.png) [@katyle](https://devforum.zoom.us/u/katyle)\
**Post date:** [July 22, 2019, 7:06pm UTC](https://devforum.zoom.us/t/how-to-refresh-token-if-refresh-token-in-incorrect/3338/11 "2019-07-22T19:06:38Z")

</div>

When I’m actually using the access token, I’m getting an error message which I can understand ({“code”:124,“message”:“Access token is expired.”}). But, when I’m trying to get a refreshed access token, I’m getting the following error:

“code”:124,“message”:“the token id160is outside of the token tolerance offset0. The current id is 161”.

As far as I can see from the Azure diagnostic logs, there were not any failures writing to Azure Key Vault. Is it possible that the refresh token was explicitly de-commissioned on your end?

Thanks,

Katy

This message (including any attachments) contains confidential information and is for the sole use of the intended recipient. If you believe that you have received this email in error, please destroy it and notify the sender immediately.

---

<div class="post-metadata">

**Author:** ![michael\_p.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/michael_p.zoom/32/18105_2.png) [@michael\_p.zoom](https://devforum.zoom.us/u/michael_p.zoom)\
**Post date:** [July 22, 2019, 8:23pm UTC](https://devforum.zoom.us/t/how-to-refresh-token-if-refresh-token-in-incorrect/3338/12 "2019-07-22T20:23:57Z")

</div>

Hi @katyle,

> [@katyle](#):
>
> “code”:124,“message”:“the token id160is outside of the token tolerance offset0. The current id is 161”.

No, we don’t de-commission keys on our end. Usually when you receive this message, that means the refresh token is invalid. Was there any network errors or outages?

The quickest way would be to have the customer re-auth the app to obtain a new access & refresh token.

Thanks

---

<div class="post-metadata">

**Author:** ![katyle](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/katyle/32/1098_2.png) [@katyle](https://devforum.zoom.us/u/katyle)\
**Post date:** [July 23, 2019, 5:12pm UTC](https://devforum.zoom.us/t/how-to-refresh-token-if-refresh-token-in-incorrect/3338/13 "2019-07-23T17:12:43Z")

</div>

Thanks Michael.

Edward/Arul:

I created a ticket with MS for them to check the diagnostic logs for our Azure Key Vault. I didn’t see any store secret failures in the time frame in question. Neither did Microsoft. So, it is still a bit of a mystery. When I get a minute, I’ll write a  
query to run against my Azure table logging to list key vault updates on the 18th. I realized later that the history list for Key Vault secrets that we see in the Azure portal is not easily searchable in order by date/time.

Katy

This message (including any attachments) contains confidential information and is for the sole use of the intended recipient. If you believe that you have received this email in error, please destroy it and notify the sender immediately.

---

<div class="post-metadata">

**Author:** ![michael\_p.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/michael_p.zoom/32/18105_2.png) [@michael\_p.zoom](https://devforum.zoom.us/u/michael_p.zoom)\
**Post date:** [July 23, 2019, 9:53pm UTC](https://devforum.zoom.us/t/how-to-refresh-token-if-refresh-token-in-incorrect/3338/14 "2019-07-23T21:53:29Z")

</div>

Hi @katyle,

Let us know if you have any other questions.

Thanks

---

<div class="post-metadata">

**Author:** ![katyle](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/katyle/32/1098_2.png) [@katyle](https://devforum.zoom.us/u/katyle)\
**Post date:** [July 23, 2019, 11:21pm UTC](https://devforum.zoom.us/t/how-to-refresh-token-if-refresh-token-in-incorrect/3338/15 "2019-07-23T23:21:30Z")

</div>

I’ll update you on this thread if I glean any additional information.

Katy

This message (including any attachments) contains confidential information and is for the sole use of the intended recipient. If you believe that you have received this email in error, please destroy it and notify the sender immediately.

---

<div class="post-metadata">

**Author:** ![michael\_p.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/michael_p.zoom/32/18105_2.png) [@michael\_p.zoom](https://devforum.zoom.us/u/michael_p.zoom)\
**Post date:** [July 24, 2019, 5:10pm UTC](https://devforum.zoom.us/t/how-to-refresh-token-if-refresh-token-in-incorrect/3338/16 "2019-07-24T17:10:35Z")

</div>

@katyle Ok just let us know.

---

<div class="post-metadata">

**Author:** ![muhammad.faizan.cs](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/muhammad.faizan.cs/32/4144_2.png) [@muhammad.faizan.cs](https://devforum.zoom.us/u/muhammad.faizan.cs)\
**Post date:** [April 2, 2020, 9:15am UTC](https://devforum.zoom.us/t/how-to-refresh-token-if-refresh-token-in-incorrect/3338/18 "2020-04-02T09:15:02Z")

</div>

anything positive happened in this thread, I have the same situation but unable to tackle it

---

<div class="post-metadata">

**Author:** ![katyle](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/katyle/32/1098_2.png) [@katyle](https://devforum.zoom.us/u/katyle)\
**Post date:** [April 2, 2020, 6:59pm UTC](https://devforum.zoom.us/t/how-to-refresh-token-if-refresh-token-in-incorrect/3338/19 "2020-04-02T18:59:34Z")

</div>

Actually, it has happened again. And this time, I got to the diagnostic logs early enough to see why. Here is what happened:

1. Client (my) code sends request with good OAuth refresh token, client ID and client secret to the Zoom OAuth server.
2. Zoom OAuth server appears to have processed the request successfully, and is sending a response back with the new OAuth token.
3. But, my client code got a gateway timeout exception reading the response. So, I never got the new OAuth token and thus now only have an old OAuth token in storage.
4. The result is that I cannot call any V2 API for the affect Zoom account, until an account Admin re-authorized my application.

As I’ve said before, this is not a good model for a background application that does not have any interaction. Additionally, the application is multi-tenant. So, the person that would have to re-authorize the application is a customer and not an internal user. Can’t be going to the customer and asking them to re-authorized our application without any reason (e.g. no new feature set).

---

<div class="post-metadata">

**Author:** ![tommy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tommy/32/72769_2.png) [@tommy](https://devforum.zoom.us/u/tommy)\
**Post date:** [April 3, 2020, 3:32am UTC](https://devforum.zoom.us/t/how-to-refresh-token-if-refresh-token-in-incorrect/3338/20 "2020-04-03T03:32:11Z")

</div>

Hey @katyle,

Sorry to hear this happened. We can increase the tolerance limit if you would like.

Please let me know the app name.

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![tommy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tommy/32/72769_2.png) [@tommy](https://devforum.zoom.us/u/tommy)\
**Post date:** [April 3, 2020, 3:32am UTC](https://devforum.zoom.us/t/how-to-refresh-token-if-refresh-token-in-incorrect/3338/21 "2020-04-03T03:32:29Z")

</div>

Hey @muhammad.faizan.cs,

Are you still unable to refresh?

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![katyle](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/katyle/32/1098_2.png) [@katyle](https://devforum.zoom.us/u/katyle)\
**Post date:** [April 3, 2020, 7:11pm UTC](https://devforum.zoom.us/t/how-to-refresh-token-if-refresh-token-in-incorrect/3338/22 "2020-04-03T19:11:07Z")

</div>

That would be great. The likelihood of a session drop in the middle of receiving the response from a OAuth token refresh request has gone up quite a bit in the past few weeks. Many customers are using Zoom conferencing more as a way to  
continue to be able to work during the stay at home orders issued due to the Covid-19 outbreak (as you are already probably painfully aware of😊).

Thanks,

Katy

[Next page](https://devforum.zoom.us/t/how-to-refresh-token-if-refresh-token-in-incorrect/3338.md?page=2)
