Cannot get access token after zoom authentication using OAuth

Hi There,

we are integrating zoom authentication in our website.
we have create OAuth app from marketplace

after successful authentication, user will redirected to
https://glass.mirobotic.tech/authentication/zoom?code=vy5yl8hHwt_OcVP5NTIQ3OGmdNk3ZSZ6w

and using this code we are trying to get access_token but we are getting error

{
    "reason": "Invalid authorization code",
    "error": "invalid_grant"
}

below is code by which are making request to get access_token from our server

import requests

url = "https://zoom.us/oauth/token"

payload = "grant_type=authorization_code&code=vy5yl8hHwt_OcVP5NTIQ3OGmdNk3ZSZ6w&redirect_uri=https%3A%2F%2Fglass.mirobotic.tech%2Fauthentication%2Fzoom"
headers = {
    'authorization': "Basic ***
    'content-type': "application/x-www-form-urlencoded",
    'cache-control': "no-cache",
    'postman-token': "2a1e7f38-4ffb-7387-a1af-bfbec5e49203"
    }

response = requests.request("POST", url, data=payload, headers=headers)

print(response.text)

please help on this

Hi,

@jovy , is your redirect uri on the “allow list” in your app credentials page?

And authorization is “Basic client_id:client_secret” ?

Thank you,
Gianni

1 Like

Hi @gianni.zoom. Thank you for the advice. I am not the original poster, but thanks to your first suggestion, I was able to get the OAuth token using postman!

1 Like

So happy to hear that @OmarM !

Hi @gianni.zoom
After adding redirect url into allow list, its working for me,
thanks for your help!

1 Like

Okay great @jovy ! Happy to hear it!

Could someone share instructions for POSTMAN? I’m also getting:
{
“reason”: “Invalid authorization code”,
“error”: “invalid_grant”
}

Hi @tomeriko ,

Try this: Guide: Making a Zoom API Call with OAuth Credentials in Postman

Gianni

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