Search code examples
google-app-enginegmailoauth-2.0

Using Access Token from google cloud to login to Gmail


I have been able to get the access token from the Google APP i created using oauth 2.0 flow .

Can someone help me to figure how i can now use this access token to log in into Gmail directly without asking user to fill the credentials again?

Till now i tried googling and reading all the document related to oauth 2.0 and did not discover anything

https://mail.google.com/accounts/TokenAuth?auth=[TOKEN]&continue=https://mail.google.com/&service=mail&source=[YOUR_APP_NAME]

Tried above with no luck where auth=refresh token.


Solution

  • You cant get the user email threads with those scopes. In fact there is only one simple inbox feed that google provides (with another scope). To really get the users email threads you need to use imap with oauth, or use google apps script with a published service url.