skip to Main Content

Visual Studio Code – Google API: Access mailbox to query mails

IDE: MS Visual Studio - C# Code Screenshot: Code ServiceAccountCredential cred; //UserCredential cred; string[] scopes = new string[] { GmailService.Scope.GmailLabels, GmailService.Scope.GmailModify, GmailService.Scope.MailGoogleCom }; using (var stream = new FileStream(@"C:UsersuserDownloadsiwt-mail-crm-sync-135b79aaca90.json", FileMode.Open, FileAccess.Read)) { cred = ServiceAccountCredential.FromServiceAccountData(stream); cred.Scopes = scopes; } var…

VIEW QUESTION
Back To Top
Search