Zoom response: {"reason":"Invalid request : Redirect URI mismatch.","error":"invalid_grant"}

I am getting this result when I try to authenticate via authorization code.
I have updated the allow list on the app and it was working fine until today.
Any ideas?

Hi @dilyan.georgiev

Thanks for reaching out!
Can you please make sure that your Redirect URL matches with the one added to the Allow List?
Best,
Elisa

It happens when I run this OAuth with Zoom
redirect_uri is usually empty because it is a request from my integration service. Should it be filled?
It has been working two days ago!

Hi, i have a similar question, but error happened when refresh token, can you help to check this. and also i’m not sure why it’s disappeared after i edit some times.

https://devforum.zoom.us/t/invalid-token-invalid-grant/64681

1 Like

Hi @timothy.ji
I can not see your post! could you share more about your issue here!
:slight_smile:

Hi @dilyan.georgiev
Yes, you should have a redirect url and add i t to the Allow list.
Let me know if that does the trick! :wink:

error related to refresh token can occur
find this useful
https://devforum.zoom.us/t/invalid-token-error-message-when-trying-to-refresh-oauth-token/13363

It does not work! I am sending the request from my BE service, I attach the authorization code and the redirect url listed in the OAuth allow list defined in the app’s credentials. The result is the same.

Hi, can you help to show this question? i’m also not able to see it now, i’m not sure why it been hidden. i have some important info in this request and i haven’t keep it on my side. i have received this email.


Hello,

Our automated spam filter, Akismet , has temporarily hidden your post in Invalid Token! invalid_grant for review.

A staff member will review your post soon, and it should appear shortly.

We apologize for the inconvenience.

1 Like

hey @dilyan.georgiev
Are you adding the redirect url to the allow list??

Yes! I tried every single url from the Allow list as redirect but the result is still the same on our development environment.
However it works on prod without the return_url query parameter.

Is the localhost domain on the redirect_uri field in Zoom Marketplace App? If you recently moved the app to production and that production url/domain name is in the redirect_uri field for you app. Example: “yourproductionapp.com

But when running locally, you are running from a different host, example:
localhost:8088. Then you will always get that error.

I have to apps: Fea (front end app) and Bea (back end app). Fea is listed as redirect_uri domain. Bea, my backend app, cannot make that request to ZoomApi to get the tokens because she is not on the domain of the redirect_uri declared in my Zoom Marketplace app. So I make all requests from Fea and then proxy stuff to Bea when I need to.

Suggested Architecture: Fea and Bea.

Fea:

  • login/authentication calls proxied to Bea
  • Zoom Api calls for authentication: { code, tokens }
  • embedded ZoomMtg object/player
  • cookies
  • UI

Bea:

  • JWT calls to ZoomApi
  • internal api calls (db, internal services)
  • session management

Hope this helps!?

I am not running it locally. I run it on test environment and there are redirect urls and credentials for development purposes. The problems happens there but not on production.

Here is an update,
The authentication worked when I added the query parameters used for the first redirect url. So the comparison is not only the base url from the configuration but also the query parameters which differ from user to user.
That’s something that needed clarifying.
Thank you anyways!
Best regards

Thank you for the update @dilyan.georgiev
So you were only missing the redirect uri when making the request in your query parameters?

No, my redirect url was there but the query parameters were missing and I didnt know that they were necessary for every call.

@dilyan.georgiev
Ah I see…
Thanks for the update and I am glad to see that its working now!