google-api-dotnet-client

Google Calendar API Service Account Error 401 Invalid credential

前提是你 提交于 2020-05-31 03:42:31
问题 I'm trying to create a Google Calendar Service Account. Here are my credentials: Here's my service account definition (Site Wide delegation for service account is enabled): Here's my "Manage API client access" page: And this is my code: string userName = "xxx@yyy.it"; string[] Scopes = { CalendarService.Scope.Calendar, CalendarService.Scope.CalendarEvents }; string ApplicationName = "Client per quickstart"; ServiceAccountCredential credential = GoogleCredential.FromFile(@"path\credentialjson

Google Calendar API Service Account Error 401 Invalid credential

回眸只為那壹抹淺笑 提交于 2020-05-31 03:41:17
问题 I'm trying to create a Google Calendar Service Account. Here are my credentials: Here's my service account definition (Site Wide delegation for service account is enabled): Here's my "Manage API client access" page: And this is my code: string userName = "xxx@yyy.it"; string[] Scopes = { CalendarService.Scope.Calendar, CalendarService.Scope.CalendarEvents }; string ApplicationName = "Client per quickstart"; ServiceAccountCredential credential = GoogleCredential.FromFile(@"path\credentialjson

Not able to successfully run an Azure Function which contains code to Upload Video to YouTube

浪尽此生 提交于 2020-03-23 23:15:22
问题 I am basically creating an HTTP Trigger Azure function, which has the code to upload a video to YouTube using the YouTube API. The code was pretty much provided by the YouTubeAPI docs: https://developers.google.com/youtube/v3/docs/videos/insert. I re-formatted the code a bit to fit it into the Azure function. However, when I try to run the function locally on my Visual Studio, I get an 500 error saying: Executed 'Function1' (Failed, Id=84400f0c-b6e4-4c78-bf55-30c4527a8b5f) System.Private

Issue with creating an Azure Function “No job functions found” error

痴心易碎 提交于 2020-02-25 04:02:16
问题 What I am trying to achieve is that, I want to be able to create an Azure Function that would upload a video to YouTube using the YouTube API. example:https://developers.google.com/youtube/v3/docs/videos/insert . After creating the azure function, I then want to use that function inside my Azure logic app. Here is the code for the Azure function(uploded video): using Google.Apis.Auth.OAuth2; using Google.Apis.Services; using Google.Apis.Upload; using Google.Apis.Util.Store; using Google.Apis

Issue with creating an Azure Function “No job functions found” error

大憨熊 提交于 2020-02-25 04:00:10
问题 What I am trying to achieve is that, I want to be able to create an Azure Function that would upload a video to YouTube using the YouTube API. example:https://developers.google.com/youtube/v3/docs/videos/insert . After creating the azure function, I then want to use that function inside my Azure logic app. Here is the code for the Azure function(uploded video): using Google.Apis.Auth.OAuth2; using Google.Apis.Services; using Google.Apis.Upload; using Google.Apis.Util.Store; using Google.Apis

How to create a instance of UserCredential if I already have the value of Access Token?

僤鯓⒐⒋嵵緔 提交于 2020-01-29 03:02:07
问题 So I have this code My question is how do I configure the UserCredential if I'm already authenticated via OAuth? The current scenario is the code will display another login page redirecting to google. Since I'm already authenticated via OAuth using asp.net MVC and I already have the token how to I get rid of the GoogleWebAuthorizationBroker and directly pass the token? string[] scopes = new string[] {PlusService.Scope.PlusLogin, PlusService.Scope.UserinfoEmail, PlusService.Scope

How to create a instance of UserCredential if I already have the value of Access Token?

核能气质少年 提交于 2020-01-29 03:01:11
问题 So I have this code My question is how do I configure the UserCredential if I'm already authenticated via OAuth? The current scenario is the code will display another login page redirecting to google. Since I'm already authenticated via OAuth using asp.net MVC and I already have the token how to I get rid of the GoogleWebAuthorizationBroker and directly pass the token? string[] scopes = new string[] {PlusService.Scope.PlusLogin, PlusService.Scope.UserinfoEmail, PlusService.Scope

Authentication Error using Google Directory API from C#

ⅰ亾dé卋堺 提交于 2020-01-25 19:23:18
问题 I'm trying to call the Google Apps Directory API so that I can list users to my organization's Google Apps Account I have scoured for hours through their documentation and have been able to come up with the code below. However, I get the following error. Invalid Credentials [401] I suspect that it has to do with the way I constructed the ServiceAccountCredential [STAThread] static void Main(string[] args) { Console.WriteLine("Google Directory Service API"); Console.WriteLine("================

Authentication Error using Google Directory API from C#

自古美人都是妖i 提交于 2020-01-25 19:22:25
问题 I'm trying to call the Google Apps Directory API so that I can list users to my organization's Google Apps Account I have scoured for hours through their documentation and have been able to come up with the code below. However, I get the following error. Invalid Credentials [401] I suspect that it has to do with the way I constructed the ServiceAccountCredential [STAThread] static void Main(string[] args) { Console.WriteLine("Google Directory Service API"); Console.WriteLine("================

Google Coordinate OAuth2 with Service Account

痞子三分冷 提交于 2020-01-20 08:41:27
问题 I have a C# console application with Google Coordinate .Net library and Service Account open authentication. private const string SERVICE_ACCOUNT_EMAIL = "XXX@developer.gserviceaccount.com"; private const string SERVICE_ACCOUNT_PKCS12_FILE_PATH = @"<path-to-private-key-file>\YYY-privatekey.p12"; private const string GOOGLE_COORDINATE_TEAM_ID = "ZZZ"; private CoordinateService BuildService() { X509Certificate2 certificate = new X509Certificate2(SERVICE_ACCOUNT_PKCS12_FILE_PATH, "notasecret",