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.

google-api-dotnet-client
Filter by
Sorted by
Tagged with
0 votes
0 answers
130 views

C# Google Admin API - Enable Gmail and other apps

I've been working with the Google Admin API C# library for a few days now to create / delete users. Which I have got working. However when I create a new user via the API, the Gmail app is turned off ...
Benjamin Watkins's user avatar
1 vote
1 answer
2k views

How to send emails from a .net core console application via Gmail API?

I've created a console application to send confirmation messages from a gmail account as a cron job, initially it used mailkit but it's no longer working so I added an apikey to a new project on ...
mapr 's user avatar
  • 119
0 votes
0 answers
392 views

C# Google Drive API Empty Files List

I want to get a list of names of files from Google Drive but I get an empty list each time I created a project on Google Console I enabled Google Drive API I created a user in OAuth consent screen I ...
Kerillos Adly's user avatar
1 vote
1 answer
220 views

How to access calendars from an application without needed to ask for email account and password?

I want to develop an application to access some caledars in a google account. My idea is to just set the google account, [email protected] and the application can connect. The only requirement would ...
Álvaro García's user avatar
0 votes
2 answers
1k views

Error at GoogleWebAuthorizationBroker.AuthorizeAsync

I'm trying to connect to my GoogleDrive using C#. My code is: using Google.Apis.Auth.OAuth2; using Google.Apis.Calendar.v3; using Google.Apis.Drive.v3; using Google.Apis.Services; using Google....
Pimager's user avatar
  • 149
1 vote
1 answer
1k views

What URL do I use to send users to google oauth2 consent screen

I am trying to write a simple application to access google's api using user authentication tokens and html requests, however I am struggling to find what URL I send users too in order for them to ...
Oliver M's user avatar
0 votes
1 answer
715 views

System.Net.Http.HttpRequestException while invoking Gmail service API in C#

The following exception occurs randomly when using Gmail API in C#. My code works fine without any issues for few hours. The below exception occurs in a random manner. To resolve the issue, I need to ...
pradeep's user avatar
  • 305
3 votes
1 answer
1k views

Refresh token missing in Google Oauth response file

I'm implementing Google OAuth in ASP.Net MVC application using Google's OAuth .Net library. Below is my code. IAuthorizationCodeFlow flow = new GoogleAuthorizationCodeFlow( new ...
pradeep's user avatar
  • 305
0 votes
1 answer
513 views

How can I delete duplicate video from a Youtube Playlist by its playlist ID?

private static void RemoveVideo(YouTubeService youTubeService, string playlistId, string videoId) { // Find the matching video item var videos = youTubeService.PlaylistItems.List("snippet&...
Duy Nguyen's user avatar
1 vote
0 answers
106 views

C# UserCredential issue on refreshing token in Parallel context

The web application is written with C# framework net45. The credentials are retrieved by this code: private Task<UserCredential> GetCredentialByJSONAsync(FileInfo clientSecrets) { using (var ...
ryan86pika's user avatar
0 votes
1 answer
1k views

Could not determine client ID from request error while refreshing token

I'm using installed application client ID for my Google Oauth setup. After user authentication is successful using GoogleWebAuthorizationBroker.AuthorizeAsync, I received access token from Google and ...
pradeep's user avatar
  • 305
1 vote
1 answer
388 views

How to authenticate on behalf of user to access their google calendar information from webjob/azure function?

We have a webapp that will allow users to sync certain events in their calendar to our system. We can have the user login to google and authorize us to read their calendar and profile. Now in order to ...
thefenry's user avatar
  • 124
0 votes
1 answer
2k views

google drive Api not working in production "Failed to launch browser with"

i'm facing an issue with google drive API, it is working on my local machine, but once i deploy the project to the server, the google drive API service stops working, it is throwing an oauth2 ...
else forty's user avatar
5 votes
1 answer
2k views

How to authorize Google anlaytics data api with OAuth2

I am trying to connect to the new Google Analytics Data api using C# to request data from the new google analytics GA4. The only sample i can find is Quickstart client libraries .net This does work ...
Linda Lawton - DaImTo's user avatar
0 votes
1 answer
82 views

How to call Entitlements api of SubscribeWithGoogle service for each user already registered

Hi i need to call this api of google to retrive informations about all users already registerd to my app with their google account. in Google console i created a new service account to enable "...
FDB's user avatar
  • 1,013
0 votes
0 answers
179 views

How to get access_token from google oath2 into a class library

In a net class library, I have to call this google service. https://subscribewithgoogle.googleapis.com/v1/publications/PUBLICATION_ID/entitlements?access_token=GSI_ACCESS_TOKEN We already register in ...
FDB's user avatar
  • 1,013
1 vote
1 answer
1k views

Google.Apis.Auth.OAuth2.Mvc library and refresh token

I'm trying to retrieve the reviews from our business account. For this I'm using the Google.Apis.Auth.OAuth2.Mvc library for .net https://www.nuget.org/packages/Google.Apis.Auth.MVC/ and following ...
Bryan Miguel's user avatar
1 vote
1 answer
765 views

Google Auth Code Flow requesting token generates invalid client error when exchanging ID token for Access Token

Fairly new in looking at the Google OAuth library, but have spent a while in Azure/Exchange OAuth. We have a wrapper around the various libraries in the Adapter Pattern, so our app code is consistent ...
Simon's user avatar
  • 736
0 votes
1 answer
397 views

How to use GMail API to create drafts without user interaction

I have a C# program running on an unattended, headless server. I need the program to be able to send email and create draft emails in my GMail account. So I need a permanent key or authorisation token ...
Nikki Locke's user avatar
  • 2,879
2 votes
0 answers
929 views

Blazor webassembly access-control-allow-origin error and Google API

I created a Blazor WebAssembly proj: In my Google console I created a new Web application project where I specified Authorized Javascript Origin and Authorized redirect URIs, like below In my Blazor ...
Owe's user avatar
  • 29
1 vote
1 answer
2k views

How to get all TeamDrives, Folders, and Files with Google Drive API (using pagination)

I have to go through all team drives, folders, and files and the code I have works perfectly fine: /// <summary> /// Get All files inside a folder /// </summary> //...
Luis Valencia's user avatar
0 votes
2 answers
937 views

Google.Analytics.Data.V1Alpha - property "daterange" read only

https://developers.google.com/analytics/devguides/reporting/data/v1/quickstart-client-libraries I have run the sample code of the quickstart in c# and this works fine. But I want to use it in an older ...
elke's user avatar
  • 1
2 votes
1 answer
1k views

Purchases.Voidedpurchases.List returns empty response

I'm making request to google Android Publisher api to check purchases that has been voided in my application. The problem is that response is always empty (with code 200). I have some refunded ...
Deusald's user avatar
  • 83
0 votes
1 answer
449 views

CORS Issue with Google OAuth ASP.NET MVC sample code

I'm using this code sample Web applications (ASP.NET MVC) to access Google Classroom API. I have added these in Google Cloud Platform project. http://localhost:51234 as Authorized JavaScript origins ...
Vaibhav's user avatar
  • 26
2 votes
1 answer
2k views

Google Drive API extremely slow

I use the following code which is literally copied from Google's own .NET quickstart to list the files in your Google Drive account (the auth part has been adapted to use a refresh-token obtained by ...
user3700562's user avatar
1 vote
1 answer
427 views

Gmail SMTP XOAUTH2 error: JWT has expired

Yesterday I created a ClientID & Client Secret (using this guide) to authenticate a desktop application (C#/.NET) to send emails from a Gmail account. My method, which authenticates and sends an ...
ChrisC's user avatar
  • 902
1 vote
0 answers
795 views

How to catch authorization fail, clear cookies and request access again

I have created a simple web application using Asp .net core 3 with the Google api .net client library. This example just requests a users profile information from the People api. public void ...
Linda Lawton - DaImTo's user avatar
0 votes
0 answers
214 views

How to upload a range of data inside "list" results in invalid values

I am having a problem to upload a list data from C# to google sheets. First trial I tried to follow this code. And it was worked. static void CreateEntry() { var range = $"{sheet}!A:F"; var ...
aroy's user avatar
  • 13
1 vote
0 answers
803 views

How does Google Calendar API's Sync Token work with different request filters (timeMin, timeMax) for each request?

The goal of my app is to keep a synchronized copy of the Google users' calendars and events for the past 7 days and next 7 days. I.E, every time it performs calendar/events queries against the Google ...
thankyoussd's user avatar
  • 2,241
2 votes
1 answer
170 views

How to retrieve email from sent (google api)

I want to get an email from my gmail sent items via c#. I used this service.Users.Messages.Get("me",id); but it get 404 error. All other apis works properly. Thanks.
Saeed Bolhasani's user avatar
1 vote
1 answer
1k views

Google.Apis.MyBusinessAccountManagement.v1

The Google.Apis.MyBusinessAccountManagement.v1 .NET client library calls itself v1. If I use that will I have access to the API v4.9 endpoints? If not...how do I use the GoogleCredential from the ...
s15199d's user avatar
  • 7,583
12 votes
1 answer
18k views

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 ...
s15199d's user avatar
  • 7,583
0 votes
0 answers
58 views

google directory api retrieve addresses

I got null when I tried to retrieve addresses from directory api foreach (var userItem in users) { employees = new PeopleModel { ...
fatim's user avatar
  • 23
0 votes
2 answers
3k views

Client is unauthorized to retrieve access tokens on google service

I am trying to upload the file from local system to my gmail Google Drive. I have created the Google Service with my gmail account. Service account address generate by google is [email protected]....
A.Goutam's user avatar
  • 3,462
1 vote
1 answer
204 views

How do I authenticate using OAuth2 in the Google Analytics Reporting API?

I'm coding in C#.NET, in a Windows console application, and trying to download Google Analytics metrics data. I've installed the Google.Apis.AnalyticsReporting.v4 NuGet library package, and it brought ...
Keith Tyra's user avatar
1 vote
1 answer
2k views

How to get email address of a user using Google Oauth .NET library

I would like to get the email address of a user after successful sign-in. Google Plus APIs will be depreciated by Google. Any other way to access just email address of the user? Using the below code, ...
pradeep's user avatar
  • 305
0 votes
1 answer
723 views

Google calendar ETag not updated after modifying calendar info (name, description etc)

I use Google Calendar API v3 to retrieve a user's CalendarList, with each CalendarListEntry containing basic information about the calendar such as summary (title), description etc. The returned ...
thankyoussd's user avatar
  • 2,241
1 vote
1 answer
395 views

How to get the real owner of a CalendarListEntry in Google Calendar API to distinguish between owned and shared calendars?

The CalendarList entries returned by Google Calendar API v3 contain a accessRole property. However, the owner value in this property simply represents the owner "role" in terms of ACL, which ...
thankyoussd's user avatar
  • 2,241
0 votes
0 answers
106 views

Make Google Calendar API client library to call API directly with access token/refresh token

We have two solutions, one is a website, the other is a windows service. We write our own HTTP client class to redirect the users to go through the Google OAuth process from the website and get the ...
Maximizer Integrations's user avatar
1 vote
2 answers
1k views

Add conference to event Google Calendar API

I can create an event but I can't create an event with a conference. I tried all these types: "eventHangout" "eventNamedHangout" "hangoutsMeet" but still getting Invalid ...
Skyglar's user avatar
  • 135
1 vote
1 answer
285 views

Server-side google authorization

I need to use the google calendar service so I need to default account for the server to use This tutorial shows how to provide end-user authorization using google https://developers.google.com/...
Skyglar's user avatar
  • 135
0 votes
1 answer
309 views

Issue of Reading and Converting Date of Google Calendar Events when language is set to Arabic in C#

I am Using Google APis .net client library to read calendar events. I have following line of code newRow["Start"] = pEventItem.Start.DateTime.HasValue ? Convert.ToDateTime(pEventItem.Start....
Neha's user avatar
  • 339
0 votes
0 answers
271 views

.NET Core Web API + Google.Apis.Admin.Directory.directory_v1 - scope issue while attempting to read chromeos devices

Our app attempts to read chrome devices from Google Workspace using the following code. IAuthorizationCodeFlow is created as follows: var flowInitializer = new GoogleAuthorizationCodeFlow.Initializer {...
gordieb's user avatar
  • 241
0 votes
0 answers
172 views

GoogleWebAuthorizationBroker.AuthorizeAsync in terminal

I'm using the common mehod: GoogleWebAuthorizationBroker.AuthorizeAsync to authorize some calls I'm making to Admob API. In my machine, everything is ok becuase I'm on macos and the browser opens ...
Notbad's user avatar
  • 6,186
0 votes
1 answer
2k views

How to set parameters to ConferenceData to create event in Google Calendar API?

A month ago I've have a code to create an event (I'm using credentials from google service account ) Its seem like this: eventExample.ConferenceData = new ConferenceData ...
antonio martinez's user avatar
-2 votes
1 answer
1k views

How to create event with videoconference in Google Meet in C# using Google Calendar API?

Well.. I'm trying this code to create an Event CalendarService service; GoogleCredential credential; try { string[] scopes = new string[...
Jesús Torres Torres's user avatar
-1 votes
1 answer
1k views

How to create event in Google Calendar API with videoconference in Google Meet in C#?

I'm trying this code to create object Event using C#, three month ago its worked and I created the events but now doesn't work, I realized that assembly has a new parameter "Event Type" but ...
Jesús Torres Torres's user avatar
2 votes
2 answers
435 views

Client is unauthorized error when authorizing service account

How you can create an event in google calendar with a domain-wide authority service account. I am trying to do this but it throws an error: Protected Sub btnCreate_Click(sender As Object, e As ...
Carlos Alberto Quiñonez Tellez's user avatar
0 votes
0 answers
172 views

create a Google calendar event with c# where start and end the user is asked

and a function that creates an event in the google calendar where the start date and end date are taken from two datatimePiker in custom format yyyy / MM / dd private void GoogleAPI_Add_events() { ...
Antonino Incorvaia's user avatar
2 votes
1 answer
643 views

insufficient authentication scopes error when trying to create new event

I want to create a event in Google Calendar with C#. I am at the first stages in programming but I would like to try to solve this problem. the code: private void GoogleAPI_Add_events() { ...
Antonino Incorvaia's user avatar

1 2 3
4
5
26