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-WhpLqSm2jlG6YBy8AAuthorization 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.