google-api-dotnet-client

How to add a sheet in google sheets API v4 in C#?

。_饼干妹妹 提交于 2019-12-03 08:40:44
I've been using Google Sheets API, and following The Google Guide . However there is no example, even beyond the second page of google, to add a worksheet and write to a new sheet in .NET. There is plenty for js, but I have no idea on how to 1) add a sheet or 2) write to a new sheet. How can I do this? Right now I'm able to read like in the example with out any problems, and I've only found one other reference to v4 C#. I tried going back to v3, but all documents strongly suggest using v4. Has anyone been able to do this? Here's all I've been able to do so far: // Create Google Sheets API

Google Drive API Authentication

♀尐吖头ヾ 提交于 2019-12-03 02:51:56
问题 I'd like to make an application that could access MY own Google Drive anytime, create files there, share them and so on. According to https://developers.google.com/drive/service-accounts "Use regular Google accounts as application-owned accounts" the only think I need is to get access_token and refresh_token once, store them in my application and using refresh_token I can refresh my access_token (somehow). I can get access_token using request something like https://accounts.google.com/o

How to login to Google API with Service Account in C# - Invalid Credentials

谁说我不能喝 提交于 2019-12-02 21:17:06
I'm beating myself bloody trying to get a simple service acccount login to work in C#, to Google API and Google Analytics. My company is already getting data into Analytics, and I can query information with their Query Explorer, but getting started in .Net is not going anywhere. I am using a Google-generated json file with PKI, as the documentation says that such a service account is the proper way for computer-to-computer communication with Googla API. Code snipet: public static GoogleCredential _cred; public static string _exePath; static void Main(string[] args) { _exePath = Path

Google+ Moments.insert - Unauthorized Error

穿精又带淫゛_ 提交于 2019-12-02 20:23:03
问题 According to the docuemtntation for Moments.insert with the Google+ API autentication with the following scope is required https://www.googleapis.com/auth/plus.login I am authenticating with all of the possible PlusService scopes but i am still getting the following error Google.Apis.Requests.RequestError Unauthorized [401] Errors [ Message[Unauthorized] Location[ - ] Reason[unauthorized] Domain[global] //Scopes for use with Google+ API // activating Google+ API in console // Documentation:

Google Drive API Authentication

南楼画角 提交于 2019-12-02 16:25:21
I'd like to make an application that could access MY own Google Drive anytime, create files there, share them and so on. According to https://developers.google.com/drive/service-accounts "Use regular Google accounts as application-owned accounts" the only think I need is to get access_token and refresh_token once, store them in my application and using refresh_token I can refresh my access_token (somehow). I can get access_token using request something like https://accounts.google.com/o/oauth2/auth?scope=https://www.googleapis.com/auth/drive.file&redirect_uri=http://localhost;response_type

Login Required 401 using Google ServiceAccountCredential using Google Admin Directory API

孤街醉人 提交于 2019-12-02 16:19:46
问题 I have tried to follow the simple example listed here: https://developers.google.com/admin-sdk/directory/v1/quickstart/dotnet The difference is I generated a Service Account Credential, and assigned it as a Delegate with the Role Project Owner, so it has full access. I also assigned it the proper namespaces for scopes. Here it has access to orgunits which is what I'm trying to list in the Directory API Here is my service account defined Here are my credentials I downloaded the JSON for the

Folders are not shown under root directory when use 'root' in parents when using Google Drive api files list

旧巷老猫 提交于 2019-12-02 12:09:28
问题 I just wanted to see folders and files under root directory when i set ‘root’ in parents in Q, but I can see only one file titled “Get started” pdf file. (I used C# code) Where are my folders? But I can see folders when I search by name (ex. name=’Folder1′) in the code. Also I can see the folder output when I use Api test called “Try this API” which is on API help website (https://developers.google.com/drive/v3/reference/files/list). So only C# code does not show folders? Can you please tell

Google Calendar API - Not Returning From Execute() C#

耗尽温柔 提交于 2019-12-02 11:43:55
问题 Running the code below never returns from the Execute function. I have a private calendar on my personal gmail account that I have shared with the developer.gserviceaccount.com account. Looking at the API Manager, the usage/quotes show that I have used or even hit the api yet. Any thoughts appreciated. using System.Security.Cryptography.X509Certificates; using System.Web; using Google.Apis.Calendar.v3; using Google.Apis.Auth.OAuth2; using Google.Apis.Services; public class

Google Auth runs in Visual studio but hangs when deployed to IIS

我的梦境 提交于 2019-12-02 10:21:50
I am working with the Google .Net client library . The way it works is when a user wants to authenticate to Google the library spawns a new webpage for the user to authenticate with. System.Diagnostics.Process.Start(authorizationUrl); My code using the library credential = GoogleWebAuthorizationBroker.AuthorizeAsync( GoogleClientSecrets.Load(stream).Secrets, scopes, userName, CancellationToken.None).Result; If I run this locally via Visual studio it works fine. However if I try to deploy it just hangs. If run it using Visual studio using Local IIS. I get the following error. System.Exception:

Folders are not shown under root directory when use 'root' in parents when using Google Drive api files list

别来无恙 提交于 2019-12-02 05:33:15
I just wanted to see folders and files under root directory when i set ‘root’ in parents in Q, but I can see only one file titled “Get started” pdf file. (I used C# code) Where are my folders? But I can see folders when I search by name (ex. name=’Folder1′) in the code. Also I can see the folder output when I use Api test called “Try this API” which is on API help website ( https://developers.google.com/drive/v3/reference/files/list ). So only C# code does not show folders? Can you please tell me why it shows only files, not folders? FYI: I authenticated using service account and used Google