‘Invalid request : Redirect URI mismatch.’ error

Description
Getting Redirect URI mismatch when trying to get access token, not really sure what is going wrong since URI’s match in the account & in request

Error
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

How To Reproduce (If applicable)
https://zoom.us/oauth/token?grant_type=authorization_code&code=V2oh6v4FUd_IJemJDJjST2FCvNrDaZJfA&redirect_uri=https://localhost:5001/merchant

Screenshots (If applicable)

Additional context
not shown: Authorization header set to: Basic {base64encoded(clientid:clientsecret)}

It seems odd because the redirect_uri which retrieves the code is ok…

Additional info:

Hey @vic.miron,

That is strange. Can you try adding the /merchant to your redirect url in the App Marketplace settings?

Thanks,
Tommy

Hi @tommy,

Thanks for reaching out to me. I get the exact same issue:

Anything more that I can provide to give you more insight to the issue?
The odd thing is that I am able to get the code (the redirect_uri param is ok for that but not for this…

Victor

@tommy I’m a new user and can’t post more than 1 pic:

Hey @vic.miron,

What is the name of your OAuth app? I will test it to see if I can fix the issue.

Thanks,
Tommy

Hi @tommy

image

Hi @tommy

Have you had a chance to look over the above mentioned issue?

Victor

Hey @vic.miron,

In your Redirect URL for OAuth input, please try putting your ngrok domain.

Thanks,
Tommy

Hey @tommy

This is what I’ve did in the beginning, note the first two screenshots.
Should I try something different?

Victor

Hey @tommy,

Just following up on the above since we’ve been blocked for about 2 weeks on this issue and can’t proceed with the integration that @vic.miron is trying to build. Is there any chance we get on a call with someone to help us out?

Best,
Arielle Bitton

Hey @weflutter, @vic.miron,

Sure, I will PM you.

Thanks,
Tommy

Hi. I’m having the same problem.

  1. getting the code works fine and it’s the same redirect_uri. I only have one.
  2. it was working fine
  3. I added a querystring param locally (myVar) that is passed after the zoomAuth redirection during login, so the url in the browser looks like this:
    https://{mydomainname}/?myvar=aaba3854fc33c0648079a3e84881&code=greh6YcVBK_Sv5welu0TpmJTYxzXG28eQ
  4. Is the query param “myvar” causing this problem. I believe it is.
  5. How can i fix this. I can’t seem to find a fix here in your devForum or docs.

Thanks.

Hi @Lynk-Developer ,

Yes it’s probably the cause. Please remove the parameter and use the standard OAuth authorization/authentication set up described in our docs.

Gianni

I changed query param {myVar} to {state}. Works now.