# ZOOM API refresh token not working {"reason":"Invalid Token!","error":"invalid\_request"}

**URL:** <https://devforum.zoom.us/t/zoom-api-refresh-token-not-working-reason-invalid-token-error-invalid-request/37089>\
**Category:** API and Webhooks\
**Created:** [November 27, 2020, 11:35am UTC](https://devforum.zoom.us/t/zoom-api-refresh-token-not-working-reason-invalid-token-error-invalid-request/37089 "2020-11-27T11:35:48Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![hashwide](https://avatars.discourse-cdn.com/v4/letter/h/ac8455/32.png) [@hashwide](https://devforum.zoom.us/u/hashwide)\
**Post date:** [November 27, 2020, 11:35am UTC](https://devforum.zoom.us/t/zoom-api-refresh-token-not-working-reason-invalid-token-error-invalid-request/37089/1 "2020-11-27T11:35:48Z")

</div>

**Description**  
I’m trying to refresh the access\_token by using the refresh\_token but ended up getting an error

**Error**

> “reason”: “Invalid Token!”, “error”: “invalid\_request”

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

> OAuth

**Which Endpoint/s?**

> [https://zoom.us/oauth/token](https://zoom.us/oauth/token)

**How To Reproduce (If applicable)**  
Steps to reproduce the behavior:

> CLIENT\_ID = \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*;  
> CLIENT\_SECRET = \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*;  
> $refreshToken = \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*;
> 
> $url = “[https://zoom.us/oauth/token?grant\_type=refresh\_token&refresh\_token=](https://zoom.us/oauth/token?grant_type=refresh_token&refresh_token=)”.$refreshToken;  
> $header = array(  
> ‘Content-Type: application/json’,  
> 'Authorization: Basic '. base64\_encode(CLIENT\_ID.“:”.CLIENT\_SECRET)  
> );  
> $ch = curl\_init();  
> curl\_setopt($ch, CURLOPT\_URL, $url);  
> curl\_setopt($ch, CURLOPT\_HTTPHEADER, $header);  
> curl\_setopt($ch,CURLOPT\_POST, 1);  
> curl\_setopt($ch,CURLOPT\_RETURNTRANSFER, true);  
> $response = curl\_exec($ch);  
> curl\_close ($ch);  
> $result = json\_decode($response, true);

**Screenshots (If applicable)**

 ![Untitled](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/d/3/d30b20e8e6492853c83ae5e3b53f3fd35e2f835f.png)

Can someone tell me why this is happening?

Thanks

---

<div class="post-metadata">

**Author:** ![will.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/will.zoom/32/14417_2.png) [@will.zoom](https://devforum.zoom.us/u/will.zoom)\
**Post date:** [November 30, 2020, 8:12pm UTC](https://devforum.zoom.us/t/zoom-api-refresh-token-not-working-reason-invalid-token-error-invalid-request/37089/2 "2020-11-30T20:12:51Z")

</div>

Hey @hashwide,

Can you ensure that you’re using the latest refresh\_token value? Note that the refresh\_token is updated each time a new access\_token is fetched—you will need to update this token each time.

Thanks,  
Will

---

<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:** [December 31, 2020, 6:12am UTC](https://devforum.zoom.us/t/zoom-api-refresh-token-not-working-reason-invalid-token-error-invalid-request/37089/3 "2020-12-31T06:12:58Z")

</div>

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