Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google Authentication API: How to get the user's gmail address

I've been studying the Google authentication API (AuthSub)... My question is, how do I get the user's account information (at least their Gmail address) after the authentication has passed?

Because currently, all I get back from the authentication process is a token granting me access to which ever Google service I have specified in the scope, but there's no easy way to even get the user's login id (Gmail address) as far as I can tell...


If so, what Google service allows me to access the user's information?

like image 638
user15974 Avatar asked Sep 17 '08 13:09

user15974


3 Answers

Google Authentication API is a token based system to authenticate a valid user. It does not expose any of other interface that allows to get account holder information back to authorizer.

like image 96
bugBurger Avatar answered Sep 19 '22 00:09

bugBurger


Using the Google AppEngine GData services, you can request the user to give you access to their Google Mail, Calendar, Picasa, etc. Check it out here.

like image 29
Joe Skora Avatar answered Sep 20 '22 00:09

Joe Skora


You can get some of the data through the OpenID API, with the ax extension. If you are authenticating with other methods, best I found is calling https://www-opensocial.googleusercontent.com/api/people/@me/@self and it will get you name, email and picture. Be sure to have http://www-opensocial.googleusercontent.com/api in scopes when authenticating.

like image 39
StasM Avatar answered Sep 22 '22 00:09

StasM