# Zoom refresh token API not working

**URL:** <https://devforum.zoom.us/t/zoom-refresh-token-api-not-working/21686>\
**Category:** API and Webhooks\
**Created:** [June 18, 2020, 9:11am UTC](https://devforum.zoom.us/t/zoom-refresh-token-api-not-working/21686 "2020-06-18T09:11:21Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ronald.b](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/ronald.b/32/9587_2.png) [@ronald.b](https://devforum.zoom.us/u/ronald.b)\
**Post date:** [June 18, 2020, 9:11am UTC](https://devforum.zoom.us/t/zoom-refresh-token-api-not-working/21686/1 "2020-06-18T09:11:22Z")

</div>

**Description**  
I want to refresh the access\_token by using the refresh\_token but I only ended up getting this error ` "reason": "Invalid Token!", "error": "invalid_request"`

I am using the exact refresh\_token I got by the time I get the access token given by my redirect zoom redirect URI.

**Error**  
` "reason": "Invalid Token!", "error": "invalid_request"`

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

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

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

request URL = [https://zoom.us/oauth/token](https://zoom.us/oauth/token)?

Exact code using PHP / Laravel Framework

```
$url = 'https://zoom.us/oauth/token?';
$client_id = ' ********************************';
$client_secret = ' *****************************';

$param = array(
    'grant_type' => 'refresh_token',
     //refresh_token is coming from the request
    'refresh_token' => $request->refresh_token,
);

$headers = array(
    "Authorization: Basic ". base64_encode($client_id.":".$client_secret),
    "content-type: application/json"
);

$params = http_build_query($param);

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,$url.$params);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);

$result = curl_exec($ch);

return response()->json($result);`

```

**Screenshots (If applicable)**

 ![image](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/2X/6/6db31ba57f6382bf8b28ce7d16b2ca55920bce80.png)

**Additional Info**  
Note that I tried immediately the refresh token right after I got the access\_token. Can someone tell me why this is happening?

---

<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:** [June 23, 2020, 6:23pm UTC](https://devforum.zoom.us/t/zoom-refresh-token-api-not-working/21686/2 "2020-06-23T18:23:14Z")

</div>

Hey @ronald.b,

I think you had a copy / paste error.

All the refresh tokens start with an `e`.

 ![6db31ba57f6382bf8b28ce7d16b2ca55920bce80](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/2X/9/9fc217dadc99d22896bc8e9fec0fed1e82842129.png)

Double check you are pasting in the full refresh token and try again. 🙂

Thanks,  
Tommy

---

<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:** [August 21, 2020, 10:24pm UTC](https://devforum.zoom.us/t/zoom-refresh-token-api-not-working/21686/3 "2020-08-21T22:24:21Z")

</div>


