Refresh access token issue

Hello,
I am using zoom meeting REST APIs. Initially i created app in zoom marketplace with my zoom business plan. When i make API request its generating access token successfully, but when its expire after 1 hour, i am enable to make refresh token request. Its returning an error every time as following -

Error
{
“reason”: “Invalid Token!”,
“error”: “invalid_request”
}

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

Which Endpoint/s?
/oauth/token

Kindly guide me with the solution asap.

Hi @bhagyesh.koshti ,

Can you please confirm you’re doing the following to get a refresh? https://marketplace.zoom.us/docs/guides/auth/oauth#refreshing

Thank you,
Gianni

Hello,
Yes i am following steps mentions in API document for refresh token API.

Here is a way i am requesting refresh token API call -

$refresh_token = refresh_token value received in response with access_token.

$client = new GuzzleHttp\Client([‘base_uri’ => ‘https://zoom.us’]);
$response = $client->request(‘POST’, ‘/oauth/token’, [
“headers” => [
“Authorization” => "Basic " . base64_encode(CLIENT_ID . ‘:’ . CLIENT_SECRET)
],
‘form_params’ => [
“grant_type” => “refresh_token”,
“refresh_token” => $refresh_token
],
]);

Thanks,
Bhagyesh

Can you please reply asap please?

Hello,
I need solution for this issue as soon as possible as its interfering my development process.

Hoping for quick response.

Thanks,
Bhagyesh

Hi @bhagyesh.koshti ,

Are you using the latest refresh_token value in your request? Each time you generate a token, you’ll have a new refresh token.

If that is not the problem, are you able to make a request in Postman? If you can make the request successfully in Postman, it may be a code logic issue. Please click the thread below for example:

Gianni

Hello,
My refresh token issue is fixed now.

Thanks,
Bhagyesh

1 Like

Awesome, what was the issue? @bhagyesh.koshti

Hello,
Refresh token value i passed while making refresh token request was not correct.

Thanks,
Bhagyesh

Hey @bhagyesh.koshti,

Thank you for sharing your solution here! I’ll go ahead and close this topic now but feel free to open a new topic if you encounter any further issues or questions.

Thanks,
Max