# Cannot get access token after zoom authentication using OAuth

**URL:** <https://devforum.zoom.us/t/cannot-get-access-token-after-zoom-authentication-using-oauth/64068>\
**Category:** API and Webhooks\
**Tags:** faq\
**Created:** [February 9, 2022, 11:15am UTC](https://devforum.zoom.us/t/cannot-get-access-token-after-zoom-authentication-using-oauth/64068 "2022-02-09T11:15:47Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![jovy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/jovy/32/55248_2.png) [@jovy](https://devforum.zoom.us/u/jovy)\
**Post date:** [February 9, 2022, 11:15am UTC](https://devforum.zoom.us/t/cannot-get-access-token-after-zoom-authentication-using-oauth/64068/1 "2022-02-09T11:15:47Z")

</div>

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](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

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

```

below is code by which are making request to get access\_token from our server

```auto
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

---

<div class="post-metadata">

**Author:** ![gianni.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/gianni.zoom/32/32523_2.png) [@gianni.zoom](https://devforum.zoom.us/u/gianni.zoom)\
**Post date:** [February 9, 2022, 6:01pm UTC](https://devforum.zoom.us/t/cannot-get-access-token-after-zoom-authentication-using-oauth/64068/2 "2022-02-09T18:01:57Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![OmarM](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/omarm/32/35248_2.png) [@OmarM](https://devforum.zoom.us/u/OmarM)\
**Post date:** [February 18, 2022, 3:30am UTC](https://devforum.zoom.us/t/cannot-get-access-token-after-zoom-authentication-using-oauth/64068/3 "2022-02-18T03:30:55Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![gianni.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/gianni.zoom/32/32523_2.png) [@gianni.zoom](https://devforum.zoom.us/u/gianni.zoom)\
**Post date:** [February 18, 2022, 4:55pm UTC](https://devforum.zoom.us/t/cannot-get-access-token-after-zoom-authentication-using-oauth/64068/4 "2022-02-18T16:55:10Z")

</div>

So happy to hear that @OmarM !

---

<div class="post-metadata">

**Author:** ![jovy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/jovy/32/55248_2.png) [@jovy](https://devforum.zoom.us/u/jovy)\
**Post date:** [February 25, 2022, 11:14am UTC](https://devforum.zoom.us/t/cannot-get-access-token-after-zoom-authentication-using-oauth/64068/5 "2022-02-25T11:14:11Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![gianni.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/gianni.zoom/32/32523_2.png) [@gianni.zoom](https://devforum.zoom.us/u/gianni.zoom)\
**Post date:** [February 25, 2022, 4:02pm UTC](https://devforum.zoom.us/t/cannot-get-access-token-after-zoom-authentication-using-oauth/64068/6 "2022-02-25T16:02:50Z")

</div>

Okay great @jovy ! Happy to hear it!

---

<div class="post-metadata">

**Author:** ![tomeriko](https://avatars.discourse-cdn.com/v4/letter/t/f4b2a3/32.png) [@tomeriko](https://devforum.zoom.us/u/tomeriko)\
**Post date:** [February 27, 2022, 9:44am UTC](https://devforum.zoom.us/t/cannot-get-access-token-after-zoom-authentication-using-oauth/64068/7 "2022-02-27T09:44:36Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![gianni.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/gianni.zoom/32/32523_2.png) [@gianni.zoom](https://devforum.zoom.us/u/gianni.zoom)\
**Post date:** [March 7, 2022, 3:10pm UTC](https://devforum.zoom.us/t/cannot-get-access-token-after-zoom-authentication-using-oauth/64068/8 "2022-03-07T15:10:16Z")

</div>

Hi @tomeriko ,

Try this: [Guide: Making a Zoom API Call with OAuth Credentials in Postman](https://devforum.zoom.us/t/guide-making-a-zoom-api-call-with-oauth-credentials-in-postman/64538)

Gianni

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/6/1/614bdd549b610bbaa46ff934617683a02bdaa03c.png) [@system](https://devforum.zoom.us/u/system)\
**Post date:** [April 7, 2022, 1:10am UTC](https://devforum.zoom.us/t/cannot-get-access-token-after-zoom-authentication-using-oauth/64068/9 "2022-04-07T01:10:56Z")

</div>

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