# "Invalid request : Redirect URI mismatch." when requesting access token after signing into Zoom during OAuth flow

**URL:** <https://devforum.zoom.us/t/invalid-request-redirect-uri-mismatch-when-requesting-access-token-after-signing-into-zoom-during-oauth-flow/28387>\
**Category:** API and Webhooks\
**Created:** [August 27, 2020, 10:11pm UTC](https://devforum.zoom.us/t/invalid-request-redirect-uri-mismatch-when-requesting-access-token-after-signing-into-zoom-during-oauth-flow/28387 "2020-08-27T22:11:42Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![AddisonMighty](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/addisonmighty/32/14231_2.png) [@AddisonMighty](https://devforum.zoom.us/u/AddisonMighty)\
**Post date:** [August 27, 2020, 10:11pm UTC](https://devforum.zoom.us/t/invalid-request-redirect-uri-mismatch-when-requesting-access-token-after-signing-into-zoom-during-oauth-flow/28387/1 "2020-08-27T22:11:43Z")

</div>

**Description**  
I have my a Zoom app setup to create and manage meetings and webinars, which we have tested and working. The OAuth flow only works if users are already signed into Zoom. If they are required to sign into Zoom during the OAuth flow, the error “Invalid request : Redirect URI mismatch” is returned when requesting the access token from Zoom. The redirect uri is identical in both cases, the only difference being the signed in state on Zoom.

**Error**  
When requesting the access token with a fresh code from the OAuth flow, this error is returned.  
`{"reason"=>"Invalid request : Redirect URI mismatch.", "error"=>"invalid_request"}`

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

**Which Endpoint/s?**  
`/oauth/token` POST endpoint.

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

1. Ensure you are signed out from the Zoom website.
2. Start the OAuth flow, integrated based off this guide [https://marketplace.zoom.us/docs/api-reference/using-zoom-apis](https://marketplace.zoom.us/docs/api-reference/using-zoom-apis).
3. Sign into Zoom
4. Authorize the app
5. Take code and redirect url and request an access token
6. “Invalid request : Redirect URI mismatch.” error is returned instead of token.

If you follow these same steps, but are already signed into the Zoom website, the access token will be returned, no error.

---

<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 27, 2020, 10:11pm UTC](https://devforum.zoom.us/t/invalid-request-redirect-uri-mismatch-when-requesting-access-token-after-signing-into-zoom-during-oauth-flow/28387/2 "2020-08-27T22:11:47Z")

</div>

Hey @AddisonMighty

Thanks for posting on the Zoom Devforum! I am still learning, but I will try my best to help answer your question. 🙂

Checkout these related threads that may have the answer you are looking for:

> [@Getting Invalid request : Redirect URI mismatch error](https://devforum.zoom.us/t/-/10484):
>
> Description I’m getting a Redirect URI mismatch error when trying to get an access token after getting the code. It’s probably because I misunderstood how redirect URI works. I tried the following: Exact same URI as in app settings Same URI that I provided in oauth/authorize call when getting the code I’m getting the same error every time. Error { “reason”: “Invalid request : Redirect URI mismatch.”, “error”: “invalid\_request” } Which App Type (OAuth / Chatbot / JWT / Webhook)? OAut…

> [@OAuth with zoom - redirect uri is not used for redirect](https://devforum.zoom.us/t/-/4843):
>
> Hi, I’m currently working on an OAuth application with Zoom. Here the error occurs that the redirect Uri I specified is not accepted, but I am sent back to the zoom page. My Request URL: [https://zoom.us/oauth/authorize?client\_id=XXX&response\_type=code&redirect\_uri=http://localhost:8080/vccfg/login/oauth2/code/zoom&state=XXX](https://zoom.us/oauth/authorize?client_id=XXX&response_type=code&redirect_uri=http://localhost:8080/vccfg/login/oauth2/code/zoom&state=XXX) Location I get send to after the request: [http://zoom.us/vccfg/login/oauth2/code/zoom?code=XXX](http://zoom.us/vccfg/login/oauth2/code/zoom?code=XXX) Screenshot from my browser:

> [@Persistent "Redirect URI mismatch" error](https://devforum.zoom.us/t/-/12097):
>
> Description When making the POST request to obtain the access and refresh tokens, I keep receiving a 403 status code, with the “Redirect URI mismatch” error. Error {“reason”:“Invalid request : Redirect URI mismatch.”,“error”:“invalid\_request”} Which App Type (OAuth / Chatbot / JWT / Webhook)? OAuth2 Which Endpoint/s? [https://zoom.us/oauth/token](https://zoom.us/oauth/token) Additional context I’m stuck at step 2 of OAuth2 authorization. I have obtained the authorization code from step 1, and now I’m calling the endp…

If these threads did not help, please let us know by replying back here and someone from the Developer Relations team will get back to you shortly.

Thanks,  
DeveloperBot

---

<div class="post-metadata">

**Author:** ![AddisonMighty](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/addisonmighty/32/14231_2.png) [@AddisonMighty](https://devforum.zoom.us/u/AddisonMighty)\
**Post date:** [August 27, 2020, 10:32pm UTC](https://devforum.zoom.us/t/invalid-request-redirect-uri-mismatch-when-requesting-access-token-after-signing-into-zoom-during-oauth-flow/28387/3 "2020-08-27T22:32:02Z")

</div>

Hi DeveloperBot,

None of those issues line up with this new one.

---

<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:** [August 31, 2020, 5:33pm UTC](https://devforum.zoom.us/t/invalid-request-redirect-uri-mismatch-when-requesting-access-token-after-signing-into-zoom-during-oauth-flow/28387/4 "2020-08-31T17:33:58Z")

</div>

Hey @AddisonMighty,

Checkout my post here:

> [@'Invalid request : Redirect URI mismatch.' despite using ngrok](https://devforum.zoom.us/t/invalid-request-redirect-uri-mismatch-despite-using-ngrok/26106/4):
>
> Hey @Nad, Let me know if this helps explain things: The Redirect URI needs to be the same URI from the authorization (install URL) through to the Get Access Token request. So with these URLs set: When I go to install the app from the “Activation” page, it defaults the redirect URI to the one specified in the “Redirect URL for OAuth” input: https://zoom.us/oauth/authorize?response\_type=code&client\_id=ztmR8sxaSBGZ66b5laR7Ag&redirect\_uri=https://zoom.u…

Let me know if that helps! 🙂

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![AddisonMighty](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/addisonmighty/32/14231_2.png) [@AddisonMighty](https://devforum.zoom.us/u/AddisonMighty)\
**Post date:** [August 31, 2020, 5:56pm UTC](https://devforum.zoom.us/t/invalid-request-redirect-uri-mismatch-when-requesting-access-token-after-signing-into-zoom-during-oauth-flow/28387/5 "2020-08-31T17:56:39Z")

</div>

Hi @tommy,

Thanks for the reply. Unfortunately that issue does not help. My issue only happens when the user has to sign into Zoom during the OAuth flow. If they are already signed into Zoom, no error is encountered. The redirect uri is the same in both cases.

---

<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:** [September 2, 2020, 9:23pm UTC](https://devforum.zoom.us/t/invalid-request-redirect-uri-mismatch-when-requesting-access-token-after-signing-into-zoom-during-oauth-flow/28387/6 "2020-09-02T21:23:05Z")

</div>

Hey @AddisonMighty,

I have just private messaged you about this. 🙂

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![denis.stebunov](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/denis.stebunov/32/15190_2.png) [@denis.stebunov](https://devforum.zoom.us/u/denis.stebunov)\
**Post date:** [October 1, 2020, 1:30pm UTC](https://devforum.zoom.us/t/invalid-request-redirect-uri-mismatch-when-requesting-access-token-after-signing-into-zoom-during-oauth-flow/28387/7 "2020-10-01T13:30:58Z")

</div>

Hi @tommy

We have exactly the same problem as Nad. If the user **is not logged in** into his zoom account at the start of oauth flow, and logs in during the flow, then as a result we cannot get his token. The `/oauth/token` endpoint returns this error:

```
{
  error: 'invalid_request',
  reason: 'Invalid request: Redirect URI mismatch.'
}

```

If the user has already been logged in before the start of oauth flow, then everything works as expected.  
In both cases, we use the same redirect uri and the process from our side is no different. The only difference is whether the user was logged into his zoom account.

**How to reproduce:**

- Sign out of your zoom account
- Start the oauth flow process
- Zoom prompts the user to log in
- Authorize the app
- The user returns to our site to the redirect uri specified by us earlier on the step #2
- An error occurs when trying to get a token

**Steps for which authorization works:**

- Login to your zoom account
- Start the oauth flow process
- Authorize the app
- The user returns to our site to the redirect uri specified by us earlier on the step #2
- Successfully obtaining user’s token

---

<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:** [October 2, 2020, 6:29pm UTC](https://devforum.zoom.us/t/invalid-request-redirect-uri-mismatch-when-requesting-access-token-after-signing-into-zoom-during-oauth-flow/28387/8 "2020-10-02T18:29:16Z")

</div>

Hey @denis.stebunov,

Please checkout my post here:

> [@'Invalid request : Redirect URI mismatch.' despite using ngrok](https://devforum.zoom.us/t/invalid-request-redirect-uri-mismatch-despite-using-ngrok/26106/4):
>
> Hey @Nad, Let me know if this helps explain things: The Redirect URI needs to be the same URI from the authorization (install URL) through to the Get Access Token request. So with these URLs set: When I go to install the app from the “Activation” page, it defaults the redirect URI to the one specified in the “Redirect URL for OAuth” input: https://zoom.us/oauth/authorize?response\_type=code&client\_id=ztmR8sxaSBGZ66b5laR7Ag&redirect\_uri=https://zoom.u…

Let me know if that helps! 🙂

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![denis.stebunov](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/denis.stebunov/32/15190_2.png) [@denis.stebunov](https://devforum.zoom.us/u/denis.stebunov)\
**Post date:** [October 2, 2020, 7:10pm UTC](https://devforum.zoom.us/t/invalid-request-redirect-uri-mismatch-when-requesting-access-token-after-signing-into-zoom-during-oauth-flow/28387/9 "2020-10-02T19:10:49Z")

</div>

hey @tommy,

thank you for your response, but it doesn’t solve the problem. Everything works fine if a user has been already logged in on the Zoom website. However, if a user was NOT logged in on the Zoom website prior to clicking the authorization link, and logs in during the process, then it fails with the message above. My understanding is that it’s a bug in Zoom because it either works or fails with exactly the same setup on our side.

thanks,

Denis

---

<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:** [October 5, 2020, 4:44pm UTC](https://devforum.zoom.us/t/invalid-request-redirect-uri-mismatch-when-requesting-access-token-after-signing-into-zoom-during-oauth-flow/28387/10 "2020-10-05T16:44:53Z")

</div>

Hey @denis.stebunov,

I have just private messaged you.

Thanks,  
Tommy

---

<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:** [November 5, 2020, 2:44am UTC](https://devforum.zoom.us/t/invalid-request-redirect-uri-mismatch-when-requesting-access-token-after-signing-into-zoom-during-oauth-flow/28387/11 "2020-11-05T02:44:58Z")

</div>

Closed on November 5, 2020, 2:44am UTC

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