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
5
votes
1 answer

Oauth2 login to Google api with ASP .net core MVC

I have been following Web applications (ASP.NET MVC) Attempting to connect to one of the Google APIs. using System; using System.Web.Mvc; using Google.Apis.Auth.OAuth2; using Google.Apis.Auth.OAuth2.Flows; using Google.Apis.Auth.OAuth2.Mvc; using…
5
votes
1 answer

.NET - How to upload videos to YouTube using OAuth2.0 and Offline Access from a Windows Service

I'm using the Youtube .Net libray I downloaded from Nuget. I created a windows service which is checking a folder to upload new videos to youtube. I did the tests using a console application and for this case the user had to do authorization…
5
votes
1 answer

Analytics Reporting v4 with API key

I need to integrate a very basic report from Google Analytics in the dashboard page of a CMS web application I'm building with asp.net web forms (C#). I remember I was able to do it on a test made in 2015 with API V3, but now, with V4, I get always…
5
votes
1 answer

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

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…
5
votes
2 answers

Google Drive API v3 use JSON instead of P12 (Service Account) - Unexpected character

Error: Unexpected character encountered while parsing value: e. Path '', line 0, position 0. I am using the Google .Net Client library to access the Google drive API v3 specifically the Google.Apis.Drive.v3 package. I am authorizing using…
5
votes
1 answer

.Net struggles with Webmaster Tools (Google.Apis.Webmasters.v3 Nuget package)

I wonder if anyone has got any further than me using the new Search Analytics functions of the Google Webmaster Tools API via .Net? I am using the Google.Apis.Webmasters.v3 Nuget package and have got as far as authenticating and connecting (using a…
5
votes
0 answers

Reference to Task<> claims it is defined in mscorlib

I have a working .net 4.5.2 Winforms app which uses OAuth 2.0 and Google DoubleClickBidManager library to make some API calls. I need to port it to .net 3.5 so that I can package it in SSIS. The google APIs use Async, Await and Task and to make it…
ViV
  • 1,998
  • 8
  • 27
  • 54
5
votes
1 answer

Shared a google drive folder with google service account, but service account can't see it

Writing an application that will crawl an uploads directory for packaged zip files uploaded by users, and recreate the in-zip directory structure in a Google for Work shared google drive folder. Problem: The shared folder is not accessible or…
ChrisH
  • 975
  • 12
  • 21
5
votes
1 answer

Build errors in .NET 4.0 ASP.Net solution + google-api-dotnet-client using TeamCity build server

We have migrated from TFS 2010 to TeamCity and we have issues in building our solution file. We are using .NET 4.0. Google library is notoriously causing issues with .NET 4.0 + system.net.http when trying to build it. We managed to get this setup…
J.Hook
  • 83
  • 6
5
votes
1 answer

When I request list of files by google.api.drive I return one pdf file "How to get started with Drive"

I need to get list of files from google drive with asp.net mvc4 project. Google Drive is used as a file storage for the site. My code: const string email = "xxx"; string path = AppDomain.CurrentDomain.BaseDirectory + "file.p12"; …
5
votes
0 answers

.Net Google Drive API - The Given Header was not found

This is more of an FYI about a bug in the .Net Google Drive v2 library. When using: service.Files.Insert(body, Stream, mimeType) Make sure that the Stream position is at 0. Otherwise you will receive the error: System.InvalidOperationException: The…
Richard
  • 59
  • 4
5
votes
2 answers

How to destroy google drive token after task done?

I am able to authenticate and perform actions on google drive using credential I got after authentication but this token is there for long long time. it says expires-in : 3600 so it should expire in 1hour but when I tried it after a month it uses…
5
votes
3 answers

GoogleWebAuthorizationBroker not found

im learning C# (to develop for windows phone), and im trying to authenticate my user into Google's account. Im using this code: https://developers.google.com/api-client-library/dotnet/guide/aaa_oauth#wp var credential = await…
5
votes
1 answer

YouTube-API upload files without any error (C#)

I'm using the .net nuget (Google.Apis.YouTube.v3) from Google for the API calls. Everything works so far (getting playlists, video informations and so on..). But when I try to upload a video it finishes within seconds and nothing happens.…
Science
  • 53
  • 7
5
votes
3 answers

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

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…
Art F
  • 3,992
  • 10
  • 49
  • 81