Reputation: 51
I followed :
http://developers.google.com/+/api/oauth
and :
http://developers.google.com/+/api/latest/people/get#examples
After I acquired the access token I didn't understand how to get the user's ID? How do I use it to get the user's data?
Upvotes: 4
Views: 4426
Reputation: 217263
With the access token, you can make a people.get request with the userId me
:
GET https://www.googleapis.com/plus/v1/people/me?access_token=1234567890
↑
The returned person resource has an Id
property that contains the userId of the user:
{
"kind": "plus#person",
"id": "108189587050871927619",
... ↑
}
Upvotes: 8