UserCredential credential; string credPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "credentials", name + "\\calendar-dotnet-quickstart.json"); string path = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "client_secret.json"); using (var stream = new FileStream(path, FileMode.Open, FileAccess.Read)) { credential = GoogleWebAuthorizationBroker.AuthorizeAsync( GoogleClientSecrets.Load(stream).Secrets, Scopes, "user", CancellationToken.None, new FileDataStore(credPath, true)).Result; }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)