Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting user birthday #131

Open
MohammedAl-Mahdawi opened this issue Jan 3, 2018 · 3 comments
Open

Getting user birthday #131

MohammedAl-Mahdawi opened this issue Jan 3, 2018 · 3 comments

Comments

@MohammedAl-Mahdawi
Copy link

Hi,

First I want to thank you for this amazing module.

Second I want to get the user's birthday and here is my scop object:

{ scope: [ 'https://www.googleapis.com/auth/plus.login',
  'https://www.googleapis.com/auth/user.birthday.read', 'https://www.googleapis.com/auth/plus.profile.emails.read'] }

And my profile fields are:

profileFields: ["birthday", "email", "first_name", "gender", "last_name"]

When I authenticate with google it tells me that the app will receive my birthday, but can't find any birthday field in the "profile" object!

All the best,
Mohammed

@MohammedAl-Mahdawi
Copy link
Author

After a lot of investigation, this happens when the birthday is not set to public in the Google's about me!
But how is this, because the app asking about permission to access the birthday and I granted it that!

@RaduTudorIon
Copy link

RaduTudorIon commented Jun 5, 2020

As of 2020 this was the only thing that helped me https://stackoverflow.com/questions/62214822/trying-to-get-birthday-and-gender-with-google-people-api-in-angular

Basically you have to do a request to people api after you get the userId and the accessToken with the fields you want . This is the only way to get those extra fields
https://people.googleapis.com/v1/people/(user_id)?personFields=(fields you want)&key=(valid api key)&access_token=(accessToken in credetials in the result of the authentification)

@UmeshShelke06
Copy link

UmeshShelke06 commented Mar 5, 2023

we don't use API key right ? we used only access Token to get user information right ? i mean where I will get API key ? and how google account will verify that ? and what is user ID here ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants