google-api-dotnet-client

Change Redirect Url in Google Drive - C# (Part 2)

半城伤御伤魂 提交于 2019-12-08 10:01:00
问题 I dont know why, but this Message was deleted by moderator in my First question and moderator wrote that I need open New question. So...... (part 1 - Change Google default Auth Redirection - C# (Google liblary)) I try bad have little problem: If i try this code: public class MyNewAuthorizationCodeMvcApp : AuthorizationCodeMvcApp { public MyNewAuthorizationCodeMvcApp(Controller controller, FlowMetadata flowData) : base(flowData.Flow, "http://www.yandex.ru", controller.Request.Url.ToString()) {

Failed to launch the browser when GoogleDriveApplication is hosted in IIS Server

五迷三道 提交于 2019-12-08 08:10:02
问题 I'm working with Google Drive API v3 in local it's working for creating token.json when i host to IIS server getting error : Access is denied Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.ComponentModel.Win32Exception: Access is denied Source Error: An unhandled exception was generated during the execution of the

Google service object for Google Calendar API

为君一笑 提交于 2019-12-08 07:39:01
问题 I am trying to use the Google Calendar API in .NET, specifically I am trying to get a list of events. According to the examples here, in different programming languages I need to create a 'service' object and an 'event' object. However, I can't find a clear explanation of what either of these objects is or how to initiate them. Does anyone have an explanation? Or can anyone provide any information or give me a link to where this is explained? It doesn't necessarily have to be in .NET Here is

Authenticating Google Drive using tokens saved in the Database

天涯浪子 提交于 2019-12-08 04:14:23
问题 I am trying to create my own implementation of IDataStore for use with Google Authentication. I have created the DatabaseDataStore (similar to one found in the sample) which implements the IDataStore. In my web application I have a register User page where I ask user to click the register button and he gets redirected to the Google authentication. This is the code for that. var result = await new AuthorizationCodeMvcApp(this, new AppFlowMetadata()). AuthorizeAsync(cancellationToken); and this

Google cloud storage upload not working with C# API

你离开我真会死。 提交于 2019-12-08 03:30:18
问题 I'm trying to upload a simple image to Google cloud storage via the C# API. It seems to succeed but I don't see anything in my Google cloud bucket. The code I have so far: Google.Apis.Services.BaseClientService.Initializer init = new Google.Apis.Services.BaseClientService.Initializer(); init.ApiKey = "@@myapikey@@"; init.ApplicationName = "@@myapplicationname@@"; Google.Apis.Storage.v1.StorageService ss = new Google.Apis.Storage.v1.StorageService(init); var fileobj = new Google.Apis.Storage

How to get all users in one organization unit using Google Directory API

℡╲_俬逩灬. 提交于 2019-12-08 03:11:47
问题 In the new released Google Directory API, I cannot find a method to get all users in a specific organization unit of Google Apps. Is it possible? And how? Based on the Google Directory API document, programmers can get all the organization units, or all the users for the whole domain, but there is no description on how to get users of one organization unit. This feature is crucial important to construct the organizations/users hierarchical tree. Please help, thanks. 回答1: There is no way to

Google Calendar API v3 - Request time out when deploy on server

最后都变了- 提交于 2019-12-08 03:07:53
问题 I tried to logged in localhost and everything works properly. The code: public static bool LoginGoogleCalendar(string clientId, string clientSecret, string idGCalendarUser, string calendarServiceScope, string folder) { try { UserCredential credential = GoogleWebAuthorizationBroker.AuthorizeAsync( new ClientSecrets { ClientId = clientId, ClientSecret = clientSecret, }, new[] { calendarServiceScope }, idGCalendarUser, CancellationToken.None, new FileDataStore(folder)).Result; return true; }

C# Google Drive API list of files from my personal drive

 ̄綄美尐妖づ 提交于 2019-12-07 23:14:14
问题 I am trying to connect to my own personal Google Drive account and gather a list of file names. What I have done: Installed all the NuGet packages required Added Google Drive to the API Manager in Google Developers Console Setup a Service Account and downloaded a P12 key for authentication Wrote the following code to call the API: string EMAIL = "myprojectname@appspot.gserviceaccount.com"; string[] SCOPES = { DriveService.Scope.Drive }; StringBuilder sb = new StringBuilder(); X509Certificate2

Google API V3 OAUTH2 Hang - TokenResponse-user Credentials File not created

人盡茶涼 提交于 2019-12-07 13:14:19
问题 Google API V3 OAUTH2 Problem Report The GoogleWebAuthorizationBroker.AuthorizeAsync code below works fine on my Windows 8.1. When I install on my Windows 7 PC and run the EXE, the AuthorizeAsync is executed, the browser opens and I click through the Select an account page and the This app would like to: page and then see a page for a short time that says Received verification code. Closing... There is no TokenResponse-user file saved in the ..\AppData\Roaming\Google.Apis.Auth folder and my

Method not found: 'Void Google.Apis.Util.Store.FileDataStore..ctor(System.String)'

我的未来我决定 提交于 2019-12-07 10:08:41
问题 I've been stuck at this for days now. I copied the exact codes from google api samples to upload files to Google Drive. Here is the code UserCredential credential = GoogleWebAuthorizationBroker.AuthorizeAsync( new ClientSecrets { ClientId = ClientId, ClientSecret = ClientSecret, }, new[] { DriveService.Scope.Drive, DriveService.Scope.DriveFile }, "user", CancellationToken.None, new FileDataStore("MyStore")).Result; But it would throw an exception at runtime: Method not found: 'Void Google