I'm trying to do what's described here: https://developers.google.com/gmail/api/v1/reference/users/getProfile
So far I'm able to send the authorization request to the user, get the code, then exchange it with for the access token. HOW DO I USE THE ACCESS TOKEN TO GET THE EMAIL ADDRESS?
I need it to login IMAP using OAuth2, wich requires the user give his e-mail, which seems redundant to me.
you have to add the "access_token" parameter and enable the Gmail API in the project page on the Developer Console