Getting error redirect_uri_mismatch when using oAuth

Hello @Ishchai ,

Welcome to Google Cloud Community!

You are getting the “Error 400: redirect URI mismatched” because the redirect URI specified in your app’s configuration does not match the redirect URI provided in your authorization process.

Required> > Determines where the API server redirects the user after the user completes the authorization flow. The value must exactly match one of the authorized redirect URIs for the OAuth 2.0 client, which you configured in your client’s API Console Credentials page. If this value doesn’t match an authorized redirect URI for the provided client_id you will get a redirect_uri_mismatch error.> > Note that the http or https scheme, case, and trailing slash (‘/’) must all match.

To resolve this, you need to attach your redirect URI value to your API key.

Check the configuration of your application, particularly the redirect URI. Ensure that the redirect URI specified in your application matches the redirect URI you are providing during the authorization process. Pay attention to any differences in the URL scheme (HTTP vs. HTTPS), port number, or additional path segments.

2 Likes