oauthgoogle-apiuserinfo

Get user info via Google API


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.


Solution

  • 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.