# Getting Invalid request : Redirect URI mismatch while hitting the access token API

**URL:** <https://devforum.zoom.us/t/getting-invalid-request-redirect-uri-mismatch-while-hitting-the-access-token-api/13644>\
**Category:** API and Webhooks\
**Created:** [April 17, 2020, 9:34am UTC](https://devforum.zoom.us/t/getting-invalid-request-redirect-uri-mismatch-while-hitting-the-access-token-api/13644 "2020-04-17T09:34:20Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![tverma](https://avatars.discourse-cdn.com/v4/letter/t/e9c0ed/32.png) [@tverma](https://devforum.zoom.us/u/tverma)\
**Post date:** [April 17, 2020, 9:34am UTC](https://devforum.zoom.us/t/getting-invalid-request-redirect-uri-mismatch-while-hitting-the-access-token-api/13644/1 "2020-04-17T09:34:21Z")

</div>

**Description**  
I’m trying to install a sample app for local dev work. My client-Id generated is -cuD2Rtm0Rb6fHbRlp3WVA. On the final step, when I try to install, I get redirected to my redirect URI - [http://localhost:7010/sg50/v2/zoom/zoomToken](http://localhost:7010/sg50/v2/zoom/zoomToken), but on trying to hit the access token call, it gives a redirect URI mismatch error.

**Error**  
URI - [https://zoom.us/oauth/token?grant\_type=authorization\_code&code=w8YtiVLFCQ\_cyE09hxJSoi7NgO5lXEP5Q&redirect\_uri=http%3A%2F%2Flocalhost%3A7010%2Fsg50%2Fv2%2Fzoom%2FzoomToken%2F%3Fcode%3Dw8YtiVLFCQ\_cyE09hxJSoi7NgO5lXEP5Q](https://zoom.us/oauth/token?grant_type=authorization_code&code=w8YtiVLFCQ_cyE09hxJSoi7NgO5lXEP5Q&redirect_uri=http%3A%2F%2Flocalhost%3A7010%2Fsg50%2Fv2%2Fzoom%2FzoomToken%2F%3Fcode%3Dw8YtiVLFCQ_cyE09hxJSoi7NgO5lXEP5Q)

Error Status - 403  
Error Desc - {“reason”:“Invalid request : Redirect URI mismatch.”,“error”:“invalid\_request”}

**Which App Type (OAuth / Chatbot / JWT / Webhook)?**  
OAuth

**Which Endpoint/s?**  
[https://zoom.us/oauth/token](https://zoom.us/oauth/token)

**How To Reproduce (If applicable)**  
Steps to reproduce the behavior:

1. Start an app creation from marketplace. Fill in details
2. At the install step, when I get redirected to my localhost URI, and hit the access token end point, the error is produced

---

<div class="post-metadata">

**Author:** ![tommy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tommy/32/72769_2.png) [@tommy](https://devforum.zoom.us/u/tommy)\
**Post date:** [April 19, 2020, 6:40am UTC](https://devforum.zoom.us/t/getting-invalid-request-redirect-uri-mismatch-while-hitting-the-access-token-api/13644/2 "2020-04-19T06:40:03Z")

</div>

Hey @tverma,

It appears you are passing the `code` in twice which is confusing the flow because it is attached to the redirect uri:

`redirect_uri=http://localhost:7010/sg50/v2/zoom/zoomToken/?code=w8YtiVLFCQ_cyE09hxJSoi7NgO5lXEP5Q`

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![tverma](https://avatars.discourse-cdn.com/v4/letter/t/e9c0ed/32.png) [@tverma](https://devforum.zoom.us/u/tverma)\
**Post date:** [April 20, 2020, 9:30am UTC](https://devforum.zoom.us/t/getting-invalid-request-redirect-uri-mismatch-while-hitting-the-access-token-api/13644/3 "2020-04-20T09:30:31Z")

</div>

Hey @tommy

Thanks for the guidance here. Along with removing the extra query param for `code`, I had to channel localhost via a tunneling proxy as well. This helped me in generating access token. Another question I had was, the scopes to access any API have and AND between them or an OR. For e.g., I wanted to get meeting details by meeting Id. For which I used the following curl:

```
curl --location --request GET 'https://api.zoom.us/v2/users/cyE09hxJSoi7NgO5lXEP5Q/meetings' \
--header 'Authorization: Bearer access_token' \
--header 'Cookie: _zm_page_auth=aw1_c_NGuHCqnoRUCzeOw9VLkfaA; _zm_ssid=aw1_c_Y3jhOwPdSqK1gFay7Tqfng; _zm_mtk_guid=27f0208193e14f098edd05dd14edea1e; _zm_o2nd=f43203ee1aab066698a9448bafd9b274; cred=2144FB780DC1B0D3CCC8727E69C24959; _zm_date_format=mm/dd/yy; _zm_ctaid=ksGeER1mSDCC9f93Fa5Phw.1587372861680.d97f5e7bfd47118e5669df5d75a2fa8b; _zm_chtaid=756'

```

Got the following response:

```
{
    "code": 4700,
    "message": "Invalid access token, does not contain scopes: [zms:meeting:read, meeting:read:admin, zms:meeting:write, meeting:write:admin]"
}

```

My access token has the following scope:  
{  
“scope”: “meeting:read meeting:write recording:read recording:write user:read user:write user\_profile webinar:read webinar:write”  
}

---

<div class="post-metadata">

**Author:** ![tommy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tommy/32/72769_2.png) [@tommy](https://devforum.zoom.us/u/tommy)\
**Post date:** [April 21, 2020, 7:20am UTC](https://devforum.zoom.us/t/getting-invalid-request-redirect-uri-mismatch-while-hitting-the-access-token-api/13644/4 "2020-04-21T07:20:02Z")

</div>

Hey @tverma,

Simply replace the userID in the path with the word `me`.

`https://api.zoom.us/v2/users/me/meetings`

Here is info on the me context:

[https://marketplace.zoom.us/docs/guides/auth/oauth#me-context](https://marketplace.zoom.us/docs/guides/auth/oauth#me-context)

[https://marketplace.zoom.us/docs/api-reference/zoom-api/meetings/meetings](https://marketplace.zoom.us/docs/api-reference/zoom-api/meetings/meetings)

 ![Screen Shot 2020-04-21 at 1.19.13 AM](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/2X/2/256dc7724dd040a116e6a1e59c47dc21a45f763a.png)

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![DeveloperBot](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/developerbot/32/12632_2.png) [@DeveloperBot](https://devforum.zoom.us/u/DeveloperBot)\
**Post date:** [August 21, 2020, 8:51pm UTC](https://devforum.zoom.us/t/getting-invalid-request-redirect-uri-mismatch-while-hitting-the-access-token-api/13644/5 "2020-08-21T20:51:32Z")

</div>


