google-api-dotnet-client

Deploying ASP.NET to Windows Azure cloud, application gives error when running on cloud

拟墨画扇 提交于 2019-12-01 03:04:13
问题 I am trying to deploy an ASP.NET application the Windows Azure cloud. I am using Google API for one of the calls in the application. When I do this, I get the following error: System.UnauthorizedAccessException: Access to the path 'Google.Apis.Auth' is denied.` ASP.NET is not authorized to access the requested resource. Consider granting access rights to the resource to the ASP.NET request identity. ASP.NET has a base process identity (typically {MACHINE}\ASPNET on IIS 5 or Network Service on

Receiving Insufficient Permission error from DirectoryService

拈花ヽ惹草 提交于 2019-12-01 02:34:53
问题 I am trying to setup c# code to manage our Google domain. I am receiving this error whenever I call service.Users.List() or any other method from the DirectoryService api. Google.Apis.Requests.RequestError Insufficient Permission [403] Errors [ Message[Insufficient Permission] Location[ - ] Reason[insufficientPermissions] Domain[global] ] I followed all the instructions on the OAuth setup. The account I am using is a domain admin. The clients secret file I am using works fine when I use it

Powershell Cmdlet Missing Assembly Google Api

谁说胖子不能爱 提交于 2019-11-30 16:48:34
Only have issues when trying to create a Powershell Cmdlet. I can execute the same code in the process record within a console app just fine. Thoughts were the App.config isn't redirecting the assembly but didn't have much success making it work. I used the nuget packages for the references to the Google-api-dotnet-client Sample Code here http://tinyurl.com/mbx3yle Error http://i.imgur.com/xiEjwAR.png Get-GAppsUsers : Could not load file or assembly 'System.Net.Http.Primitives, Version=1.5.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find

How to upload Video to youtube using Google.Apis.YouTube.v3 and C#?

无人久伴 提交于 2019-11-30 11:34:26
I have created console application using C# . Which will upload Video from local drive to youtube . I have created new app in google api using this link . I have also installed all required packages using nuget . When I run my application I am getting error as " Access Denied " I am not able to find the issue. I am getting error in Task Run() method. using System; using System.IO; using System.Reflection; using System.Threading; using System.Threading.Tasks; using Google.Apis.Auth.OAuth2; using Google.Apis.Services; using Google.Apis.Upload; using Google.Apis.Util.Store; using Google.Apis

Access User Info using Google APIs for .NET

狂风中的少年 提交于 2019-11-30 07:11:43
I'm using the Google APIs Preview (1.7.0) to authorize a user via OAuth2. I've been following the sample MVC code . This is my implementation of FlowMetadata : private static readonly IAuthorizationCodeFlow flow = ...; // Implementation of tokens public static async Task<Google.Apis.Auth.OAuth2.Web.AuthorizationCodeWebApp.AuthResult> GetCredentials(Controller controller, CancellationToken cancellationToken) { var result = await new AuthorizationCodeMvcApp(controller, new Models.Generic.AppFlowMetadata()).AuthorizeAsync(cancellationToken); if (result.Credential != null) { // Struggling here.

Analytics Reporting API V4 Client Library for .NET

筅森魡賤 提交于 2019-11-29 20:17:37
I'm trying to get some data from our google analytics instance and I'd like to use the Analytics Reporting API V4 Client Library for .NET ( https://developers.google.com/api-client-library/dotnet/apis/analyticsreporting/v4 ) so that I can bake some of this data into an administration site we have built. I'm having trouble finding any examples of using this code and the documentation seems to be incredibly sparse. I would like to use a service account to authorize as we only need to view data associated with the analytics account which we control. If anyone could provide some sample code or

How to provide Credentials programmatically to use google drive api in c# or vb.net?

為{幸葍}努か 提交于 2019-11-29 15:30:58
I made a program that uses google drive api to read data from a file on google drive. the first time you run the app it opens a web browser asking to sign in with google drive account. I want to provide the app the username and password so that it get the credentials automatically, so that users won't need to know the username and password of my google drive account. here is the code in vb.net: Dim credential As UserCredential Using stream = New FileStream("client_secret.json", FileMode.Open, FileAccess.Read) Dim credPath As String = System.Environment.GetFolderPath( System.Environment

Google Calendar Api working fine Locally but not raising its Authentication on Server

拈花ヽ惹草 提交于 2019-11-29 13:32:56
I have created a project in console.developers.google.com to use Google Calendar API . there we need to generate credential and select application type For Localhost and application type other following is the Json which works fine. { "installed": { "client_id": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.apps.googleusercontent.com", "project_id": "xxxxxx-00000", "auth_uri": "https://accounts.google.com/o/oauth2/auth", "token_uri": "https://accounts.google.com/o/oauth2/token", "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs", "client_secret": "xxxxxxxxxxxx", "redirect_uris": [

c#: google drive : google apis.services are you missing an assembly or reference

江枫思渺然 提交于 2019-11-29 12:42:18
i am trying to use google.drive for .net using the quickstart example. i have installed dlls via nuget, but am receiving the following error that i am missing a reference or assembly for google.apis.service. any help would be appreciated using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using DotNetOpenAuth.OAuth2; using Google.Apis.Authentication.OAuth2; using Google.Apis.Authentication.OAuth2.DotNetOpenAuth; using Google.Apis.Drive.v2; using Google.Apis.Drive.v2.Data; using Google.Apis.Util; using Google

Access User Info using Google APIs for .NET

社会主义新天地 提交于 2019-11-29 08:19:10
问题 I'm using the Google APIs Preview (1.7.0) to authorize a user via OAuth2. I've been following the sample MVC code. This is my implementation of FlowMetadata : private static readonly IAuthorizationCodeFlow flow = ...; // Implementation of tokens public static async Task<Google.Apis.Auth.OAuth2.Web.AuthorizationCodeWebApp.AuthResult> GetCredentials(Controller controller, CancellationToken cancellationToken) { var result = await new AuthorizationCodeMvcApp(controller, new Models.Generic