How can I access information from my Gmail account like photo, tokenId, first name, last name, and Gmail id?
I have searched a lot, but there is no proper answer.
How can I access information from my Gmail account like photo, tokenId, first name, last name, and Gmail id?
I have searched a lot, but there is no proper answer.
This api https://www.googleapis.com/plus/v1/people/me returns
{
"gender": "male",
"id": "234343028403284",
"displayName": "xxx",
"name": {
"familyName": "foo",
"givenName": "bar"
},
"url": "https://plus.google.com/34324234324324",
"image": {
"url": "https://lh3.googleusercontent.com/dlkfjdsfds/djfldsf"
}
...
}
Before your application can get access to data from a user's Google Account, the application must request authorization from the user.
See https://developers.google.com/+/api/oauth for information about oauth.
try: https://developers.google.com/oauthplayground/ will help you understand oauth flow:
Step 1: Select Google+, Authorize apis
Step 2: Exchange authorization code for tokens
Step 3:
enter https://www.googleapis.com/plus/v1/people/me Send the request