Questions tagged [google-api-dotnet-client]

The Google APIs Client Library for .NET is a generic .NET runtime client for Google Services. It supports OAuth2.0 authentication, and is able to generate strongly typed client libraries for Discovery-based services.

The Google APIs client library for .NET provides simple, flexible, and powerful access to Google APIs such as Drive, YouTube, Calendar, Storage and Analytics.

The library supports OAuth2.0 authentication, and is able to generate strongly typed client libraries for Discovery-based services.

Requirements

  • .net framework 4.5

Supported platforms

  • .NET Framework 4.5 and 4.6
  • .NET Core (via netstandard1.3 support)
  • Windows 8 Apps
  • Windows phone 8 and 8.1
  • Portable class libraries

Developer documentation

Nuget Packages

To make it easer for you to develop with the Google APIs using the Google API client Library for .NET we have released a number of NuGet packages. A full list of all the packages available can be found at Google.APIs nuget

1271 questions
0
votes
1 answer

Switching from Google provisioning API to JSON service authorizing through oauth2

I'm just getting started porting my old code over to the new google apps json service but I'm not clear on the oauth. I'm looking at: https://developers.google.com/admin-sdk/directory/v1/guides/prerequisites It says: "Set up a new project in the…
Zonus
  • 2,313
  • 2
  • 26
  • 48
0
votes
1 answer

Update file with file id that is shared with me in Gdrive ,

C# App I need to update a file that is shared in Gdrive using File ID. Code: public static Google.Apis.Drive.v2.Data.File UpdateFile(DriveService service, String fileId, String newTitle, String newDescription, String newMimeType, String…
0
votes
2 answers

ArgumentException: Precondition failed.: !string.IsNullOrEmpty(authorization.RefreshToken) with Service Account for Google Admin SDK Directory access

I'm trying to access the Google Directory using a Service Account. I've fiddled with the DriveService example to get this code: public static void Main(string[] args) { var service = BuildDirectoryService(); var results =…
user2871239
  • 1,499
  • 2
  • 11
  • 27
0
votes
1 answer

Google Analytics GetRequest Error: System.Net version 2.0.5.0 Needed to see HttpStatusCode

I'm using Google Analytics Core Reporting API. I can successfully run my request with a code like this. DataResource.GaResource.GetRequest requestData = googleAnalyticsService.Data.Ga.Get(profiles, startDateStr, endDateStr,…
disasterkid
  • 6,948
  • 25
  • 94
  • 179
0
votes
1 answer

Google .NET Client Youtube v3 error

I get this following error when trying to upload a video to my youtube channel: System.ArgumentException: Precondition failed.: !string.IsNullOrEmpty(authorization.RefreshToken) at…
sanjosep43
  • 597
  • 5
  • 15
0
votes
1 answer

Authenticating a user without querying a particular Google service

I would like to use the .NET client API to authenticate a user & authorize a web server application - using the Google.Apis.* packages from NuGet. I had a look at the samples and have understood how the NativeApplicationClient and WebServerClient…
ThomasWeiss
  • 1,292
  • 16
  • 30
0
votes
3 answers

Google directory api org unit error 404

I'm calling the get, update and delete APIs for org unit through Google .net client library but get 404. I used Fiddler and saw that the request URL is malformed. Rather than my org unit path I see {/orgUnitPath*} string in the URL and customer Id…
0
votes
1 answer

How do I prevent this Google Analytics C# DotNetOpenAuth ProtocolException?

I'm using the Google APIs for .NET. I'm following the example project Simple OAuth2 but I keep getting a Protocol Exception from DotNetOpenAuth. Here's what I have now: public static void Main( string[] args ) { // Register the authenticator. …
0
votes
1 answer

'ApplyAuthenticationToRequest' is not supported by the language

Im looking into down loading DFA files from Google Cloud Storage, but i cant compile their sample project because of the above error. Specifically this occurs in the "DownloadReportFileHelper" in the "GoogleApisSample" solution. Has anyone…
CatchingMonkey
  • 1,391
  • 2
  • 14
  • 36
0
votes
1 answer

Web request to 'https://accounts.google.com/o/oauth2/token' failed using webapplication

I have SERVICE account in GoogleConsoleAPI . My console application is working fine and i am getting the data from GoogleAnalytics But when i implement the same code into WEB Application and try to access the data then I am getting the exception…
0
votes
1 answer

Trying to do a simple google drive API test using google's dot net library and service account

I put together the example code below, using some helper code that came with Google's examples for its dot net google api client libraries. The problem: It doesn't list any files info even though I uploaded one to the Gooogle account that owns this…
Elliot
  • 2,002
  • 1
  • 20
  • 20
0
votes
1 answer

ASP.NET using analytics Reporting API does not work on server

When I run my asp.net application on local host everything works great but when i publish my app on the web server this error shows up: Method 'ApplyAuthenticationToRequest' in type 'Google.Apis.Authentication.OAuth2.OAuth2Authenticator`1' from…
0
votes
1 answer

Trying to Creating users in Google Apps domain in Windows Forms code

I'm trying to create a user from a windows forms application. I've managed to do it in a consoleapp, but I want it in a proper windows app. :) To get the authentication right' I've tried to figure out how the AssertionFlowClient is working, but it…
JoBe
  • 391
  • 3
  • 12
0
votes
1 answer

Google URL Shortner API Setting Service Parameters in C#

I'm using the Google URL Shortner API, https://code.google.com/p/google-api-dotnet-client/wiki/APIs#URL_Shortener_API, and need to set the quotaUser parameter. This should be do-able via the service.ServiceParameters dictionary and quotaUser is…
MyBrokenGnome
  • 646
  • 2
  • 5
  • 16
0
votes
1 answer

Google Drive Parse error when uploading file with special unicode characters

A problem has occurred recently when trying to upload files with the Google API dotnet client sdk. When the file name has any special Unicode characters, it throws an error. Here is my code public static Google.Apis.Drive.v2.Data.File…