1

I am using Google's .NET SDK in my application and would like to get the user info. I have obtained the UserCredential object using the below scopes.

  new[] { Uri.EscapeUriString("https://www.googleapis.com/auth/userinfo.email"), 
          Uri.EscapeUriString("https://www.googleapis.com/auth/userinfo.profile") }

After this am looking for a UserInfoService to fetch the name and email of the user but it is not to be found. Note I am only using Google's SDK and not handling the request and response myself.
I have found few samples in other sites but those don't use the Google API and are forming the
request url and need to parse the response JSON.

Is there a way I can get the UserInfo without myself creating the request url and leave this to be handled by the Google API ?

Vignesh.N
  • 2,618
  • 2
  • 25
  • 33

1 Answers1

2

That was already asked before here: .NET client for the Google People API

Anyway, you should use the OAuth 2.0 library, and it looks like you will be interested in the UserInfoResource.GetRequest.

Community
  • 1
  • 1
peleyal
  • 3,472
  • 1
  • 14
  • 25