Skip to content

Latest commit

 

History

History
24 lines (13 loc) · 1.74 KB

gmail-credentials.md

File metadata and controls

24 lines (13 loc) · 1.74 KB

How To Get Authentication Completed

TROUBLESHOOT: when see invalid_grant errors, means your Grant from Google OAuth has expired.. remove your file from path configured for gmail_auth_picklepath & re-run; it will re-auth and get fresh grant

  • There you'll find your newly created OAuth Client entry under sub-section OAuth 2.0 Client IDs.

  • Click on its Download Icon to get your credentials json. Copy it somewhere safe, configure its path in config yaml to be used.

  • Do remember to update other values of your config yaml as desired.

  • (Only on first run) Now when you run your required GMail utility for the first time, it will open GMail link in your default browser. You'll need to allow permission in browser, can then close it. The utility will save theis auth token in a pickle file locally and use it for new future until revoked.

Once revoked last step will get repeated again, on next run.

  • If it gives error like deleted_client: The OAuth client was deleted., you probably have deleted the key directly or indirectly (deleting Google Project to which it belongs). You would need to create a new project, enable GMail API in it and re-create OAuth Key.

  • For an error like "Gmail API has not been used in project {project-number} before or it is disabled., then you just need to enable Gmail API for the project in which you created the key.