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
13
votes
2 answers

How to create a instance of UserCredential if I already have the value of Access Token?

So I have this code My question is how do I configure the UserCredential if I'm already authenticated via OAuth? The current scenario is the code will display another login page redirecting to google. Since I'm already authenticated via OAuth using…
Prince Jea
  • 5,524
  • 7
  • 28
  • 46
13
votes
3 answers

Google API OAuth2, Service Account, "error" : "invalid_grant"

I'm trying to use service account to sync calendars from Dynamics CRM software to Google. During this I faced lack of documentation on google API for .net, especially regarding authorization. Most of Google samples can't be even compiled because of…
13
votes
4 answers

.NET Google api 1.7 beta authenticating with refresh token

I've been looking at the Oauth .Net Google Apis in order to authenticate via OAuth and use the Google drive Apis. Specifically, I want to use a refresh token I already have stored in order to use it to instantiate a GoogleDrive service. I've found…
Dan G
  • 836
  • 11
  • 31
12
votes
2 answers

Retrieving new Firebase access token for REST services in .NET from Google auth service

After a change of firebase authorization system, I'm trying to retrieve access token in c# from google auth server. According to new documentation: https://firebase.google.com/docs/reference/rest/database/user-auth#section-api-usage I created…
mjpolak
  • 721
  • 6
  • 24
12
votes
1 answer

Google Drive API Authentication

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"…
Anubis
  • 2,484
  • 2
  • 22
  • 33
11
votes
1 answer

Quota exceeded for quota metric 'Requests' and limit 'Requests per minute' of service 'mybusinessaccountmanagement.googleapis.com'

I get this error after making my first request: Quota exceeded for quota metric 'Requests' and limit 'Requests per minute' of service 'mybusinessaccountmanagement.googleapis.com' How can I be over my quota after my first…
s15199d
  • 7,261
  • 11
  • 43
  • 70
11
votes
2 answers

Google Sheets API. The request is missing a valid API key. [403]

I'm using .net package Google.Apis.Sheets.v4 Client Library. Everything was fine, but last time (about a week ago) there is an error: The request is missing a valid API key. [403] when I'm trying to batchGet with 150+ ranges in a query. If I split…
lagrange-
  • 215
  • 1
  • 2
  • 9
11
votes
4 answers

Google Drive API using C# - Uploading

I am trying to use Google Drive API from an asp.net application to upload files. Problem: The code works locally but when uploaded to server nothing happens (the page just keeps loading...no consent screen showing. Help appreaciated. "UploadedPdf"…
pessi
  • 681
  • 1
  • 10
  • 26
11
votes
4 answers

Access User Info using Google APIs for .NET

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…
CodingIntrigue
  • 75,930
  • 30
  • 170
  • 176
10
votes
4 answers

Loading Service account Json key file

Google has recently started to give us a Json key file for service account instead of the P12 key file. I have been trying to get this there isn't a lot of information out there and what info I have seen says this should work. string[] scopes =…
9
votes
3 answers

How do I authenticate with the Google v3 api using a Service Account

I've followed the sample code here: https://code.google.com/p/google-api-dotnet-client/wiki/OAuth2#Service_Accounts Authorization fails with: DotNetOpenAuth.Messaging.ProtocolException: Error occurred while sending a direct message or getting the…
9
votes
4 answers

Can't list users with Google Directory API Admin SDK

I'm trying to use the AdminService to manage my domain's users and groups, but I'm stuck with a simple request to get all the users of my domain. There is the code in C#: public Users GetAllUsers() { var provider = new AssertionFlowClient( …
zhywu
  • 1,012
  • 1
  • 12
  • 26
8
votes
1 answer

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

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. { …
8
votes
4 answers

Access Google Calendar API using Service Account Authentication

I was able to access the Google Calendar API using the .NET Quickstart tutorial and it worked great! The problem with that tutorial is that it uses Open Authentication or OAuth2. I will like to do the same using Service Account Authentication.…
8
votes
1 answer

GoogleWebAuthorizationBroker.AuthorizeAsync freezes

I have a C# .net web application that I use to upload videos to Youtube. This worked about 6 months ago but now it has stopped working. The following code just hangs when I launch my website via Visual Studio on my local computer: …
Harry Boy
  • 4,159
  • 17
  • 71
  • 122
1
2
3
84 85