Hello,
I have created an App in zoom marketplace and is in draft status currently. I was able to authorize with the app and get the code, access and refresh token for the first time.
But after an hour, when I tried to call the refresh token API, I am getting the response:
{
“reason”: “Invalid Token!”,
“error”: “invalid_grant”
}
Steps I followed:
FIrst we are checking if the user exist in our db if the user does not exist, then we will call the API:
https://zoom.us/oauth/authorize?client_id=6wG1sdT5QOyC3As57R4SA&response_type=code&redirect_uri=http://localhost:3000/de/user/redirect/zoom&code_challenge=<CODE_CHALLENGE>
After allowing the access, I am getting the code which I use to call the oauth/token API and get the access and refresh token:
Endpoint: https://zoom.us/oauth/token
Request:
code: <CODE>
grant_type: authorization_code
code_verifier: <CODE_VERIFIER>
Headers:
Authorization: Basic base64(CLIENT_ID:CLIENT_SECRET)
This API is giving me the access and refresh token.
when I tried to use the refresh token to get a new access token, it is not working. I am pretty sure the refresh token is valid and I am calling the API in POST method.
Endpoint: https://zoom.us/oauth/token
grant_type: refresh_token
refresh_token: <REFRESH_TOKEN>
Headers:
Authorization: Basic base64(CLIENT_ID:CLIENT_SECRET)
Response:
{
“reason”: “Invalid Token!”,
“error”: “invalid_grant”
}
I am following all the instructions mentioned in the oauth document: OAuth for user authorized apps