Search code examples
gmailoauth-2.0google-oauth

How to get OAuth access to GMail?


How can you get user-initiated access to read their email? It seems there is OpenID, OAuth, OAuth2 and random other solutions.

The best I came up with so far is OAuth2 with scope=https://mail.google.com/.

Is there any permission that would just give me read-only access to the mail and ideally not scare the user with a permission notice like:

"View and manage your mail Perform these operations when I'm not using the application"

All I'd like, if possible "View your mail".


Solution

  • The GMail API documentation says there is only one scope giving access to everything.

    There is also a feature called GMail Inbox Feed which could be what you want, but it is only available on Google Apps domains.