I used Windows Azure Mobile Services for Xamarin Android to authenticate the User for Google and obtained the 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 get an an HTTP 401 Error : Unauthorized. I want to get the User Info using this auth token. Is the auth token being returned from the Azure Mobile Services not fit for this purpose? Any ideas will be appreciated.
Thanks.