"Invalid request : Redirect URI mismatch."

Description
I am using the zoom Oauth flow. I following the steps as per the documentation. When i try to acquire access token I keep getting “Invalid request : Redirect URI mismatch.”
I have been through all the probable reasons. I have also setup https on my system. But I cant seem to figure out the problem. Need help. I am have been stuck on this for more than two days.

Error
“Invalid request : Redirect URI mismatch.”

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

Which Endpoint/s?
https://zoom.us/oauth/token?grant_type=authorization_code&code=AXaRew6L5b_ywLJ0GMTRZqJBQmT9as-Ig&redirect_uri=https%3A%2F%2F192.168.1.37%3A8080%2Fzoom%2Fauth%2FredirectUri

How To Reproduce (If applicable)
Private app

  1. Just acquire the auth code and pass it in the access token request.

Screenshots (If applicable)


Additional context
Add any other context about the problem here.

Hey @libsysitdesk

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

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

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

I have been through all the posts, but it still doesn’t work.

Hi @libsysitdesk,

Are you using a local URI? If so, this is likely the issue. You’ll need to host your localhost on a publicly accessible server such as ngrok. Let me know if this helps:

Thanks!
Will

I tried using Ngrok server but it still gives the same error.

I also tried it with a local https server and provided my IP x.x.x.x in the redirect url but even that didnt work.

Hi @libsysitdesk,

When using ngrok to set up a server for this, can you confirm that your Redirect URI is the same URI from the authorization (install URL), all the way through the flow to the GET Access Token request? For example, 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.us

So in my example, if I proceed to install the app, the redirect URI needs to be exactly https://zoom.us for the GET access_token request or else you will see the Redirect URI mismatch error

When you have a chance to read this over, can you please confirm that you’re following these steps exactly?

Thanks!
Will

https://435cf1298b4f.ngrok.io/zoom/auth/redirectUri/ is my redirect Url. I send the same in auth code and access token request. I even made sure that its encoded the same way as shown in install url

Does it have anything to do with the fact that I am using a free basic plan for zoom?

Hi @libsysitdesk,

Your plan shouldn’t impact your ability to authorize with OAuth. A few more things to check on:

  • Can you confirm you’ve updated your Whitelist URLs each time you’ve started up your ngrok server?
  • Can you try double encoding your redirect URL
  • Can you confirm your redirect URL doesn’t contain any query params

Thanks,
Will

I have updated everytime I start ngrok as a new domain is assigned.
Double encoding doesnt work.
No it doesnt have any query params.
Can i get some one on one chat to help me as I have been stuck on this for more than 2 weeks?

Hi @libsysitdesk,

So sorry to hear you’re still having trouble—I just DM’d you to set up some time 1:1.

Thanks,
Will

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