# Refresh token expired

**URL:** <https://devforum.zoom.us/t/refresh-token-expired/31284>\
**Category:** API and Webhooks\
**Created:** [September 25, 2020, 8:30am UTC](https://devforum.zoom.us/t/refresh-token-expired/31284 "2020-09-25T08:30:40Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![zun](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/zun/32/15923_2.png) [@zun](https://devforum.zoom.us/u/zun)\
**Post date:** [September 25, 2020, 8:30am UTC](https://devforum.zoom.us/t/refresh-token-expired/31284/1 "2020-09-25T08:30:40Z")

</div>

**Description**  
Refresh token is expired and we do not know why.

**Error**  
“Client error: `POST https://zoom.us/oauth/token` resulted in a `401 Unauthorized` response:{“reason”:“Invalid Token!”,“error”:“invalid\_request”}”

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

**Additional context**  
We saved the “refresh\_token” and “access\_token” of zomm master account in DB.  
whenever “access\_token” is expired (after 1 hour), we use “refresh\_token” to get a new “access\_token”,  
then save both new “access\_token” and “refresh\_token” into DB for the next api call.

The above mention flow is working for sometime, but sometime we got `401 Unauthorized` error.  
We are sure that the zoom account is not logged in in other place other than our admin website,  
so the “refresh\_token” stored in DB is allway the new one.

Do you have any idea that why our “refresh\_token” is expired?

---

<div class="post-metadata">

**Author:** ![DeveloperBot](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/developerbot/32/12632_2.png) [@DeveloperBot](https://devforum.zoom.us/u/DeveloperBot)\
**Post date:** [September 25, 2020, 8:30am UTC](https://devforum.zoom.us/t/refresh-token-expired/31284/2 "2020-09-25T08:30:45Z")

</div>

Hey @zun

Thanks for posting on the Zoom Devforum! I am still learning, but I will try my best to help answer your question. 🙂

Checkout this related thread that may have the answer you are looking for:

> [@Failed to find the refresh Token. The Token may be regenerated](https://devforum.zoom.us/t/-/1767):
>
> &nbsp; Hello, We have a Zoom integration through a Zoom marketplace app and we’re seeing some odd patterns regarding refresh tokens. We’re following the docs in&nbsp;[https://devdocs.zoom.us/docs/authorization/oauth-with-zoom](https://devdocs.zoom.us/docs/authorization/oauth-with-zoom) To summarize: At the end of the OAuth flow, Zoom provides us both an access and a refresh token. When the access token expires, we use the refresh token to get a new access and refresh token. We store both&nbsp;of them for the next requests. Everything works smoothly, the weird thin…

If this thread did not help, please let us know by replying back here and someone from the Developer Relations team will get back to you shortly.

Thanks,  
DeveloperBot

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/6/1/614bdd549b610bbaa46ff934617683a02bdaa03c.png) [@system](https://devforum.zoom.us/u/system)\
**Post date:** [October 25, 2020, 6:30pm UTC](https://devforum.zoom.us/t/refresh-token-expired/31284/3 "2020-10-25T18:30:55Z")

</div>

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