xamarin.android - Get User Info from Google Api Using Azure Mobile Services for Xamarin Android -


i used windows azure mobile services xamarin android authenticate user google , obtained authentication token as

while(_currentuser == null){ _currentuser = await _mobileclient.loginasync(context,   mobileserviceauthenticationprovider.google); }  var authtoken = _currentuser.mobileserviceauthenticationtoken;  var url = "https://www.googleapis.com/oauth2/v1/userinfo?access_token=" + authtoken; var request = webrequest.create (url) var response = request.getresponse (); 

i an http 401 error : unauthorized. want user info using auth token. auth token being returned azure mobile services not fit purpose? ideas appreciated.

thanks.

the token returned loginasync azure mobile service token, not google token. if want access token able talk google api, need go server side , retrieve information @ point, via user object passed scripts.

the post @ http://blogs.msdn.com/b/carlosfigueira/archive/2012/10/25/getting-user-information-on-azure-mobile-services.aspx has more information on how access token.


Comments