ZOOM API refresh token not working {"reason":"Invalid Token!","error":"invalid_request"}

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

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=”.$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)

Can someone tell me why this is happening?

Thanks

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

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