Invalid_grant issue while try to get refresh token

Hi , I am using Oauth 2.0 authentication for create meeting. so when i generate access token first time it works . but when i am try to get refresh token then getting error

“reason” => “Invalid Token!”
“error” => “invalid_grant”

I am passing API like this way.

URL :- https://zoom.us/oauth/token
Request Parameter :-
grant_type=refresh_token&refresh_token=eyJhbGciOiJIUzUxMiIsInYiOiIyLjAiLCJraWQiOiI5MGUwZTYyMS05YzRjLTRmZTEtYWY0Ny01Njk5NWE5MmVmZWUifQ.eyJ2ZXIiOjcsImF1aWQiOiIzZTliMTY2ZmUxMDIyODUyYTBiMTJjZjI0MGJlYmQ2OSIsImNvZGUiOiI5S2s2NEFZNHdtXzFrTmw5WGVwVFYyZXVpUDg4S1JhQ3ciLCJpc3MiOiJ6bTpjaWQ6R0hiX1FXd2FRaWU2M1J1dloxWFBRIiwiZ25vIjowLCJ0eXBlIjoxLCJ0aWQiOjEsImF1ZCI6Imh0dHBzOi8vb2F1dGguem9vbS51cyIsInVpZCI6IjFrTmw5WGVwVFYyZXVpUDg4S1JhQ3ciLCJuYmYiOjE2NjE4NjE3OTIsImV4cCI6MjEzNDkwMTc5MiwiaWF0IjoxNjYxODYxNzkyLCJhaWQiOiJNSDNSQUQzRlFIaS13RWxTN2k4ZjR3IiwianRpIjoiMjhmMDI2ZDEtOTY1Yi00MjNkLWEyNWEtYzFhOWM5ZGMyZWNhIn0.uJKQjoWMYqn8AtBoWH3Fkwy1weLB8RI6Zly6B6JJ6pZifWZHsIh18Hs8buh3LIPFkhnI-WhpLqSm2jlG6YBy8A

Authorization Header :-
Authorization:Basic R0hiX1FXd2FRaWU2M1J1dloxWFBROjdVNWdDclU2M25qY2dJNnQxUloyRTRs…

i am using PHP curl

$ch = curl_init($url);

    curl_setopt($ch, CURLOPT_HEADER, false);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($ch, CURLOPT_POSTFIELDS, ($tokenData));
    curl_setopt($ch, CURLOPT_POST, 1);
    curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/x-www-form-urlencoded',
    'Authorization:Basic '. $header_token,
    ));

    $response = curl_exec($ch);
    curl_close($ch);

please review this and tell me what is wrong in this. another thing is it is working sometime or sometime not. for safety i replace original Authorization to different Authorization.

i checked process of this generating of Access Token. so i noticed that when i am generating access token fresh ( Request access token ) then Refresh Token works means i am able to get access token based on refresh token. but after few seconds when again i try to get Access-Token by Refresh token then error i get. i have shared an image. in which first refresh token get when i apply freshly means Request access token. 2nd is when i try after few second.

Hey @job1608
Thanks for reaching out to the Zoom developer forum !
Make sure that you are passing your client ID and client secret as the authorization method when requesting a new access token

yes , I am sending that. If you check the image file then u can see that both times they are the same.

Hi @job1608
Have you looked into our Docs here:

Note how when you refresh an access token, you will receive a new refresh_token that then you will use to get a new access_token when needed.
Please let me know if this helps
Elisa