Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error 400: redirect_uri_mismatch #3

Open
yojimboth opened this issue Mar 17, 2021 · 1 comment
Open

Error 400: redirect_uri_mismatch #3

yojimboth opened this issue Mar 17, 2021 · 1 comment

Comments

@yojimboth
Copy link

When I try to generate the GMAIL_API_REFRESH_TOKEN using the command provided with the valid client_Id and client_secret information, the "gmail_auth2" script gave me a URL but when I copied and paste it to the Browser, google displayed the "Authorization" error with "ERROR 400: redirect_uri_mismatch" and the body detail is below:

The redirect URI in the request, urn:ietf:wg:oauth:2.0:oob, can only be used by a Client ID for native application. It is not allowed for the WEB client type. You can create a Client ID for native application at https://console.developers.google.com/apis/credentials/oauth...

Please help to look into the issue.

Regards,
YoJimBo

@dolfim
Copy link
Owner

dolfim commented Mar 17, 2021

Hello, it is a while from my last setup, so I repeated from scratch for testing.

  1. I used a personal Google account
  2. Create a project in https://console.cloud.google.com/
  3. Enable Gmail API from the API library
  4. Then you should setup the Oauth consent screen. Google will guide you in the setup. For testing, you will have to add the test users explicitly
  5. Create new OAuth credentials
  6. Select type Desktop App (this might be what is not working for you)

Let me know if this is working. In case we will update the README with more details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants