django-gmailapi-backend
django-gmailapi-backend copied to clipboard
Error 400: redirect_uri_mismatch
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
Hello, it is a while from my last setup, so I repeated from scratch for testing.
- I used a personal Google account
- Create a project in https://console.cloud.google.com/
- Enable Gmail API from the API library
- 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
- Create new OAuth credentials
- 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.