Redirect uri mismatch error

Im trying to connect my Gmail account, so I followed the steps in this link https://www.make.com/en/help/connections/connecting-to-google-services-using-a-custom-oauth-client?_gl=1*1pho9ep*_ga*NzA4MTA2NTM0LjE3MDkyMjQ4NzQ.*_ga_MY0CJTCDSF*MTcwOTIyNDg3NC4xLjEuMTcwOTIyNjE5MC42MC4wLjA., I added the following URI https://www.integromat.com/oauth/cb/google-restricted/ as shown in the video but I get the following error “Error 400: redirect_uri_mismatch”. what could be the issue?
Screenshot 2024-02-29 at 2.44.04 PM

Welcome to the Make community!

1. Enable the API

Direct Link: Google Cloud console

2. Insert all the known Google Redirect URIs for your app

Direct Link: https://console.cloud.google.com/apis/credentials

How to create an OAuth app in GCP: https://www.make.com/en/help/tutorials/calling-google-apis-via-the--http-make-a-oauth-2-0-request--module ← FOLLOW THIS

Here are all the known redirect URIs you need for your Google Cloud Console OAuth app. If you set these up, you can reuse the same GCP app for other Google apps and modules on Make.

https://www.make.com/oauth/cb/oauth2
https://www.make.com/oauth/cb/google-custom
https://www.make.com/oauth/cb/google-restricted
https://www.make.com/oauth/cb/google-cloud-speech
https://www.make.com/oauth/cb/google-analytics-4
https://www.integromat.com/oauth/cb/oauth2
https://www.integromat.com/oauth/cb/google-custom
https://www.integromat.com/oauth/cb/google-restricted
https://www.integromat.com/oauth/cb/google-cloud-speech
https://www.integromat.com/oauth/cb/google-analytics-4

Once you’ve set these up, you can use/reuse the same Make connection for all the supported Google apps & modules on Make - you’ll only have to enable the respective APIs for your custom app in Google Cloud.

3. Publish your GCP OAuth2 app

Direct Link: https://console.cloud.google.com/apis/credentials/consent

You might need to set your OAuth application to “Production”, otherwise the credentials expire very frequently.

1. To do this, go to menu item “OAuth consent screen”

or click here https://console.cloud.google.com/apis/credentials/consent

2. Then click the button below if the Publishing status is not “In production”

4. Configure the HTTP OAuth2 module

You need a “Authorize parameters” key of redirect_uri with the above Make OAuth2 callback URL.

You can find the Client ID and Client Secret in the OAuth2 app you created in GCP, on the right-hand side of where you inserted the 8 callback URLs in step 2:

3 Likes

“Thank you! All those URIs did the trick!”

2 Likes

No problem, glad I could help!

1. If you have a new question in the future, please start a new thread. This makes it easier for others with the same problem to search for the answers to specific questions, and you are more likely to receive help since newer questions are monitored closely.

2. The Make Community guidelines encourages users to try to mark helpful replies as solutions to help keep the Community organized.

This marks the topic as solved, so that:

others can save time when catching up with the latest activity here, and

  • allows others to quickly jump to the solution if they come across the same problem

To do this, simply click the checkbox at the bottom of the post that answers your question:
Screenshot_2023-10-04_161049

3. Don’t forget to like and bookmark this topic so you can get back to it easily in future!

2 Likes

Hi @samliew , really nice way to put it. But I’ve one question, what to put in URL section (above Method) in HTTP request?

Welcome to the Make community!

That looks like a new question, could you please create a separate topic for this?

While it’s tempting to hop onto an existing thread, a more effective approach would be to start a new topic just for your question. It helps community experts find and respond to your query quicker, and keeps our space organised for everyone. If you start a new conversation you are also more likely to get help from other users. You can refer others back to a related topic by including that link in your question. Thank you for understanding and keeping our community neat and tidy.

The “New Topic” link can be found in the top-right of the header:

Screenshot_2023-12-19_091207

1 Like