In my app using Google OAuth from Google APIs, i want to get user account details . User will enter his user name and password and login. I saw samples where contact details of the user are retrieved. My requirement is to get user account details like full name, profile photo etc.
I think i can do similar to retrieving contacts , but i am not able to find “SCOPE” to be used for getting account details.
Please help me with right pointers or any sampl app / document on this topic.
thanks a lot
I got my answer
scope – https://www.googleapis.com/auth/userinfo.profile
return youraccess_token = access_token
get https://www.googleapis.com/oauth2/v1/userinfo?alt=json&access_token=youraccess_token
you will get json :
{ “id”: “xx”, “name”: “xx”, “given_name”: “xx”, “family_name”: “xx”, “link”: “xx”, “picture”: “xx”, “gender”: “xx”, “locale”: “xx” }