How to get user email from google plus oauth

Set your scopes to:

And use the endpoint:

https://www.googleapis.com/oauth2/v1/userinfo?alt=json

Usage:

get https://www.googleapis.com/oauth2/v1/userinfo?alt=json&access_token=youraccess_token

You will get JSON:

{ "id": "xx", 
  "name": "xx", 
  "given_name": "xx", 
  "family_name": "xx", 
  "link": "xx", 
  "picture": "xx", 
  "gender": "xx", 
  "locale": "xx" 
}

Leave a Comment