# Getting Invalid request : Redirect URI mismatch error

**URL:** <https://devforum.zoom.us/t/getting-invalid-request-redirect-uri-mismatch-error/10484>\
**Category:** API and Webhooks\
**Created:** [April 1, 2020, 3:00pm UTC](https://devforum.zoom.us/t/getting-invalid-request-redirect-uri-mismatch-error/10484 "2020-04-01T15:00:17Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![ilya.peterov](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/ilya.peterov/32/4630_2.png) [@ilya.peterov](https://devforum.zoom.us/u/ilya.peterov)\
**Post date:** [April 1, 2020, 3:00pm UTC](https://devforum.zoom.us/t/getting-invalid-request-redirect-uri-mismatch-error/10484/1 "2020-04-01T15:00:17Z")

</div>

**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)?**  
OAuth

**Which Endpoint/s?**  
oauth/token

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

1. Follow Step 1 of OAuth tutorial and get the code
2. Make a POST request to `zoom.us/oauth/token` ([Step 2](https://marketplace.zoom.us/docs/guides/auth/oauth)), provide the same redirect\_uri as in the first step
3. Receive redirect URI mismatch error

**Screenshots (If applicable)**

 ![Screenshot from 2020-04-01 17-49-51](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/2X/c/c7500262829fa96a0e2a2a1bf3ac8a6806e92486.png)  
(don’t worry about the credentials on screenshots, it’s a testing app)

**Context**  
I’m trying to set up an integration with zoom (get data about past meetings for analysis). Our service is called Teamplify.

---

<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 1, 2020, 11:01pm UTC](https://devforum.zoom.us/t/getting-invalid-request-redirect-uri-mismatch-error/10484/2 "2020-04-01T23:01:28Z")

</div>

Hey @ilya.peterov,

Looks like you have query params included in your redirect url.

Can you try removing them, and making sure the redirect url matches with what you have in your Zoom OAuth settings?

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![ilya.peterov](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/ilya.peterov/32/4630_2.png) [@ilya.peterov](https://devforum.zoom.us/u/ilya.peterov)\
**Post date:** [April 1, 2020, 11:36pm UTC](https://devforum.zoom.us/t/getting-invalid-request-redirect-uri-mismatch-error/10484/3 "2020-04-01T23:36:47Z")

</div>

Hey Tommy,

I tried that and it didn’t work. I have a testing URI, a production URI, tried them both.

 ![Screenshot from 2020-04-02 02-32-14](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/2X/0/06b359efbf03c5f2fee1500e47125870de23fb51.png)

---

<div class="post-metadata">

**Author:** ![ilya.peterov](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/ilya.peterov/32/4630_2.png) [@ilya.peterov](https://devforum.zoom.us/u/ilya.peterov)\
**Post date:** [April 1, 2020, 11:37pm UTC](https://devforum.zoom.us/t/getting-invalid-request-redirect-uri-mismatch-error/10484/4 "2020-04-01T23:37:21Z")

</div>

I’m wandering if it might be connected to whitelist. Am I supposed to put testing URLs there?

 ![Screenshot from 2020-04-01 17-47-23](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/2X/1/1efbcf9be089ac2baa73f82322f16e5b226e4aa6.png)

I’m also using a local dev server URL ([local.teamplify.net](http://local.teamplify.net)) - it resolves to 127.0.0.1. Can this be the problem?

Thanks,  
Ilya

---

<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 2, 2020, 7:51am UTC](https://devforum.zoom.us/t/getting-invalid-request-redirect-uri-mismatch-error/10484/5 "2020-04-02T07:51:23Z")

</div>

Hey @ilya.peterov,

Yes, please add [http://local.teamplify.net](http://local.teamplify.net) to your whitelist and try again.

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![ilya.peterov](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/ilya.peterov/32/4630_2.png) [@ilya.peterov](https://devforum.zoom.us/u/ilya.peterov)\
**Post date:** [April 2, 2020, 8:05am UTC](https://devforum.zoom.us/t/getting-invalid-request-redirect-uri-mismatch-error/10484/6 "2020-04-02T08:05:47Z")

</div>

I put [http://local.teamplify.net](http://local.teamplify.net) in the whitelist and tried again without changing anything else. Still getting the same error.

Could there be anything else causing this?

---

<div class="post-metadata">

**Author:** ![ilya.peterov](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/ilya.peterov/32/4630_2.png) [@ilya.peterov](https://devforum.zoom.us/u/ilya.peterov)\
**Post date:** [April 2, 2020, 1:47pm UTC](https://devforum.zoom.us/t/getting-invalid-request-redirect-uri-mismatch-error/10484/7 "2020-04-02T13:47:46Z")

</div>

I managed to get it working by adding the port to app settings - [http://ivelum.local.teamplify.net:8211/](http://ivelum.local.teamplify.net:8211/).

Maybe you could make the error message a bit clearer? I think something like `Redirect URI (http://local.teamplify.net:8211/redirect/) mismatch - it must start with http://local.teamplify.net or https://teamplify.com` would work.

Also, why is redirect\_uri required in `oauth/token` anyway? Aren’t we supposed to just send post request and read the response body?

---

<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 2, 2020, 11:05pm UTC](https://devforum.zoom.us/t/getting-invalid-request-redirect-uri-mismatch-error/10484/8 "2020-04-02T23:05:02Z")

</div>

Hey @ilya.peterov,

Happy to hear you got it working! We will work on making the error messaging more clear.

> [@ilya.peterov](#):
>
> Also, why is redirect\_uri required in `oauth/token` anyway? Aren’t we supposed to just send post request and read the response body?

It is required so it validates what you have set in your OAuth app settings, and also allows you to redirect to different paths or sub domains dynamically.

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:17pm UTC](https://devforum.zoom.us/t/getting-invalid-request-redirect-uri-mismatch-error/10484/9 "2020-08-21T20:17:20Z")

</div>


