4

I am sure that I am being very blind or stupid somewhere along the way but I have looked for this answer for a while and haven't come up with anything!

I have been working on getting my actionscript app working with Google's Oauth mechanisms which is all working great now but I can't for the life of me work out how to get details on the currently logged in user.

I want to get get the user's name (alias or full name I don't care) and a thumbnail url to display at the top of my app to make it clear who is logged in.

I have looked in general google api docs, drive docs and youTube docs and not found it anywhere...

I'm sure this is a really easy answer for someone to give!

Thanks

Roaders
  • 4,373
  • 8
  • 50
  • 71

1 Answers1

5

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.

Source : Get user info via Google API

avimimoun
  • 799
  • 9
  • 23
Vignesh Kumar A
  • 27,863
  • 13
  • 63
  • 115
  • Thanks for the reply. I am sure that url worked but in the end I used this one: https://www.googleapis.com/oauth2/v3/userinfo?access_token=MyAccessToken which uses a more up to date version I think. – Roaders Dec 22 '13 at 09:21