Skip to content

Instantly share code, notes, and snippets.

Created August 12, 2015 13:00
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
Google oauth2 email.
string _client_id = "[From Google Developer Console]";
string _client_secret = "[From Google Developer Console]";
var credential = GoogleWebAuthorizationBroker.AuthorizeAsync(new ClientSecrets { ClientId = _client_id, ClientSecret = _client_secret },
new string[] {"email" },
Environment.UserName ,
new FileDataStore("Daimto.GooglePlus.Auth.Store")).Result;
// Now we create a Google service. All of our requests will be run though this.
var plusService = new PlusService(new BaseClientService.Initializer()
HttpClientInitializer = credential,
ApplicationName = "Google Plus Sample",
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment