# Error in Refreshing with refresh tokens

**URL:** <https://devforum.zoom.us/t/error-in-refreshing-with-refresh-tokens/5163>\
**Category:** API and Webhooks\
**Created:** [July 24, 2019, 6:38pm UTC](https://devforum.zoom.us/t/error-in-refreshing-with-refresh-tokens/5163 "2019-07-24T18:38:16Z")\
**Posts on this page:** 1\
**Showing post:** 6

<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:** [July 26, 2019, 5:39pm UTC](https://devforum.zoom.us/t/error-in-refreshing-with-refresh-tokens/5163/6 "2019-07-26T17:39:40Z")

</div>

Thanks @ezhilvelan006,

Can you double check you are following the correct flow?

Here is the flow from start to finish on a per install basis,

1. Go to url below (or click install app button on app dashboard) to authorize your app,

GET `https://zoom.us/oauth/authorize?response_type=code&client_id={YOUR_CLIENT_ID}&redirect_uri={YOUR_REDIRECT_URI}`

Grab the **authorization code** in the redirect url `https://yourRedriectUrl.com?code={AUTHORIZATION_CODE}`

1. Then request an access token

POST `https://zoom.us/oauth/token?grant_type=code&redirect_uri={YOUR_REDIRECT_URI}&code={AUTHORIZATION_CODE}`

HEADERS: `{"Authorization": "Basic BASE64ENCODED(CLIENT_ID:CLIENT_SECRET)"}`

This will give you an `access_token` and `refresh_token`

The `access_token` is different per user and lasts for one hour.  
The `refresh_token` is different per user and lasts for 15 years (unless you refresh access\_token in which it becomes invalid and you get a new one)

You want to store both of these.

Now let’s say your `access_token` is no longer valid

1. You need to refresh the access\_token,

POST `https://zoom.us/oauth/token?grant_type=refresh_token&refresh_token={REFRESH_TOKEN}`

HEADERS: `{"Authorization": "Basic BASE64ENCODED(CLIENT_ID:CLIENT_SECRET)"}`

Now this will return a new `access_token` AND a new `refresh_token`. You need to store these new values as the old ones are now invalid.

You can use the `access_token` to call Zoom API’s, and when the `access_token` is expired, repeat step 3 for that user to get a new `access_token` and `refresh_token`.

Let me know if this helps, otherwise I will look into your account specifically.

Thanks,  
Tommy

---

_[View the full topic](https://devforum.zoom.us/t/error-in-refreshing-with-refresh-tokens/5163)._
