Home > database >  Error 400: redirect_uri_mismatch How to format my URI?
Error 400: redirect_uri_mismatch How to format my URI?

Time:02-14

I am trying to use Google Drive's API on my Web Application. I am trying to use localhost as my URIs. These are my URI and redirect URIs:

enter image description here

I am still, however, getting the following message, what can I do to fix it?

enter image description here

CodePudding user response:

First off unless you are using JavaScript you do not need to add anything to JavaScript origin its only used for implicit flow.

Second the Redirect uri must exactly match one that you have registered in Google developer console under redirect uris. In your case you need to register http://127.0.0.1:500214/authorize/

Remember that your IDE must be using static ports if the port is changing then this isnt going to work the redirect uri must match exactly

This video will show you how to fix it Google OAuth2: How the fix redirect_uri_mismatch error. Part 2 server sided web applications.

Lastly Your application is running with a start url of http://127.0.0.1 if you want it running at localhost then you need to fix that first.

  • Related