Get user info via Google API

glagola picture glagola · Aug 20, 2011 · Viewed 212.7k times · Source

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.

Answer

Abhinav Manchanda picture Abhinav Manchanda · Aug 21, 2011

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.