[ACCEPTED]-How to specify the scope of Google API to get the birthday-hwioauthbundle
I just used and tested it using Try It. I tested 17 it with all of the different scopes.
https://www.googleapis.com/auth/plus.login Know 16 your basic profile info and list of people 15 in your circles.
https://www.googleapis.com/auth/plus.me Know who you are on Google https://www.googleapis.com/auth/userinfo.email View 14 your email address https://www.googleapis.com/auth/userinfo.profile View basic information 13 about your account
It doesn't appear to matter 12 you get back the birthday in all of the 11 scopes. But what does matter is that the 10 Users Birthday must be set to public
in the Account. If 9 it's set to anything else, your circles, only 8 you, it's not listed. This appears to be 7 true even when you are trying to see your 6 own information. (Sending Me.)
Update and the year is 2018
The People 5 api now returns the birthday of the current 4 user
People.get However i suspect its linked to google+ so 3 if the user hasn't filled it out you probably 2 wont get info.
GET https://people.googleapis.com/v1/{resourceName=people/*}
Send Resournce name of 1 people/me
and birthdays personFields
{
"resourceName": "people/117200475532672775346",
"etag": "%EgQBBzcuGgwBAgMEBQYHCAkKCwwiDDQwaGhWYzc3cXJBPQ==",
"birthdays": [
{
"metadata": {
"primary": true,
"source": {
"type": "PROFILE",
"id": "117200475532672775346"
}
},
"date": {
"month": 1,
"day": 6
}
},
{
"metadata": {
"source": {
"type": "ACCOUNT",
"id": "117200475532672775346"
}
},
"date": {
"year": 1971,
"month": 1,
"day": 6
}
}
]
Normally you will only get birthdays that 3 have public visibility. To get private birthdays 2 you need to use the https://www.googleapis.com/auth/user.birthday.read scope. See documentation 1 for which scopes give you which data https://developers.google.com/people/v1/how-tos/authorizing#profile-scopes.
More Related questions
We use cookies to improve the performance of the site. By staying on our site, you agree to the terms of use of cookies.