Is it possible to get information from user's profile via Google API? If it is possible, which API should I use?
I'm interesting in such information:
Also it would be cool to get other information from user's profile.
If the authorization server supports OpenID Connect, there are two standard ways to get user information. One is to request the authorization server to issue an ID token which contains user information. The other is to access UserInfo Endpoint. See OpenID Connect Core 1.0 for details.
After you have signed in a user with Google using the default scopes, you can access the user's Google ID, name, profile URL, and email address.
Add this to the scope - https://www.googleapis.com/auth/userinfo.profile
And after authorization is done, get the information from - https://www.googleapis.com/oauth2/v1/userinfo?alt=json
It has loads of stuff - including name, public profile url, gender, photo etc.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With