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.
1,228
questions
1
vote
1
answer
18
views
Google Workspace Service Account Credential setup for automated sending of emails and calendar automation with the .NET API Library
I have a Google Workspace with a few users in the directory, including a couple of Super Admins and regular users. I have set up a service account, created an API Client with Domain-wide Delegation.
...
1
vote
1
answer
80
views
Google Spanner - Execute a query using custom credentials
Using C#, I am trying execute a query on Google Spanner db. I understand I can use the SpannerClient and all the current documentation explains how to execute a query quite simply, however these ...
0
votes
1
answer
51
views
Authorize Google analytics data from a web application
I am trying to authorize an ASP.NET Core 6 MVC web app to Google analytics data API.
[GoogleScopedAuthorize("https://www.googleapis.com/auth/analytics.readonly")]
public async Task<...
2
votes
1
answer
60
views
Save user credentials to database with Google Web Authorization Broker
I have successfully user the GoogleWebAuthorizationBroker to save user credentials to a file. But I want my app to be a little more secure. So I am trying to save the credentials to my my sqlite ...
0
votes
0
answers
70
views
How to upload video to youtube with chunked stream using data api
First let me explain my goal,
I am downloading a video as stream from different sources like Local, S3, Drive or Mega also with buffer and stream i want to upload that video with chunk of 256KB which ...
1
vote
1
answer
57
views
Google Drive API - Search by file name only finds the file if it has recently been opened via Google Drive on chrome
I have a method that will search for a file by name and then download that file:
public static void DownloadFile(string filename)
{
service = GetDriveService();
//check if ...
-1
votes
1
answer
42
views
Assistance with starting off with the Gmail API
I need help on how to start off with google apis and how to make my first functioning gmail app (in c#)
0
votes
2
answers
54
views
Will refresh token expire once 2FA is enabled
We generated a refresh token with the following C# code snippet:
public IActionResult GetGoogleToken()
{
UserCredential credentials = GoogleWebAuthorizationBroker.AuthorizeAsync(
new ...
0
votes
0
answers
104
views
MSB4019 error after running dotnet run for ASP.net program
I got a mac and everything was still working this morning. I installed visual studio code 2022 for mac preview. Since then once i try to run my code in vs code with dotnet run getting these errors.
/...
0
votes
1
answer
136
views
Google chat - Invalid space resource name in request
can someone help me with "Invalid space resource name in request." error?
I created service account/application in Google Cloud
I created Google Chat API
I created space "server" ...
1
vote
0
answers
40
views
.NET GoogleDrive API v3: persistent "connection was closed" errors
Uploading files via FilesResource.Update or FilesResource.Create is regularly emitting IOExceptions with message "System.IO.IOException: Unable to read data from the transport connection: The ...
0
votes
1
answer
82
views
Google Token refresh issue
I need a help for refresh token in my application.
I have done an application in vb.net with Google Calendar API and "OAuth 2.0 client ID".
I gave this application to 10 teams of peoples and ...
0
votes
0
answers
64
views
How do I Authenticate with Google on a Blazor page
I want to Authorise an action with google, in this case listing the YouTube Videos from that google account on a Blazor page.
If I try this code it just throws an error
Error: System....
0
votes
1
answer
37
views
getting redirect_uri_mismatch while reading emails from gmail api
I am trying to read emails with .net core app. I have defined authorized uri as https://localhost:44345 on both sides. But when I ran the application I got uri as
redirect_uri: http://127.0.0.1:57944/...
1
vote
1
answer
75
views
Google Api authorize an App running in the console
I want to manually authorize an app that runs in the console where there is no browser available.
Basically I need the same code as they are using on this website but the C# Equivalent.
I just can't ...
1
vote
1
answer
60
views
Google.Drive.Api Oauth 2 Credientials in Xamarin android application
I am trying to read a file from google drive using my xamarin android application using google.drive.api, the latter requests Google Oauth2 ID credentials for Android to be authorized to access Google ...
1
vote
1
answer
166
views
How to get a decoded Play Integrity API token using the Google Client API for .NET
I am trying to use the Google.Apis.PlayIntegrity.v1 namespace of the Google Client API library for .NET to decode an integrity token, as recommended in the Play Integrity API documentation.
However, ...
1
vote
1
answer
348
views
Google Drive API: How to update Parents property of File in C#?
I am attempting to copy a file from one folder to another using the C# google drive API.
Unfortunately, there is no documentation (that I can find) for doing this in C#: https://developers.google.com/...
1
vote
1
answer
78
views
How do I add a metric name to MetricOrderBy when using Google.Analytics.Data.V1Beta?
I am writing come code in c# with Visual Studio 2022 to fetch Google G4 analytics data and cannot get one piece to work correctly. It is the part where a create an "OrderBy" list for the &...
2
votes
1
answer
212
views
Create Document in Google Cloud Firestore Using v1 Client Library Wrapper
I am trying to create and add a document to GCP Firestore using the .Net library for GCP: Google.Cloud.Firestore.V1 , however, I cannot figure out how to use the CreateDocumentRequest object to call ...
2
votes
1
answer
120
views
How can an authenticated user access the drive that is publicly accessible?
With this code, I am able to get the files that have been shared to the service account email.
But, when I shared the folder (that was not owned by me, but is publicly accessible) from a different ...
1
vote
1
answer
218
views
Accessing Gmail contacts via the Google People API using service account credentials always returning null
I cannot access Gmail contacts with the following code. It always returns null, and all API permissions are granted with contacts inside the account.
string jsonText = @"{""type"&...
1
vote
1
answer
210
views
Exception while batch processing document with Google Cloud DocumentAI V1 - StatusCode="DeadlineExceeded"
I am trying to create PoC for Google Cloud DocumentAI V1 using this
I am using DocAI to convert .pdf files into text using DocAI BatchProcessing. I have created console application with below code, ...
0
votes
0
answers
68
views
How to tell if a Google oAuth2 API user is logged into my C# app
I'm working on a c# project that uses Google OAuth2 API for log-in and log-out operations. If a user logs in and then closes the app without logging out they stay logged in.
I'm wondering if anyone ...
0
votes
1
answer
89
views
google calendar api net api The access token has expired and could not be refreshed. Errors: refresh error, refresh error, refresh error
I'm new to google api. I'm using google .net api, I'm getting the error:
The access token has expired and could not be refreshed. Errors: refresh error, refresh error, refresh error
I'm able to see ...
1
vote
1
answer
196
views
Google API authorisation with GoogleWebAuthorizationBroker: how to manage multiple users in web application?
I am calling Google Api authentication using this function
public static Google.Apis.Drive.v3.DriveService GetService()
{
//get Credentials from client_secret.json file
...
1
vote
1
answer
85
views
GoogleWebAuthorizationBroker doesn't work on Xamarin Android
I would like to use google oauth authorization in my mobile app. I had already implemented this feature in test Console app before. But something went wrong after I rebased my code in Xamarin Android. ...
0
votes
1
answer
350
views
Google OAuth Refresh Token Auto Update
I have a project whose Publishing status is Testing (I am using Google Ads Api).
using FileStream stream = new("Credentials.json", FileMode.Open, FileAccess.Read);
//...
1
vote
0
answers
61
views
Problems trying to log in with Google OAuth
I have an Asp.Net MVC project where I set up a user login using Google login credentials.
In development environment everything went well, and I was able to log in with my Google user, but in ...
1
vote
1
answer
551
views
Google.Apis.Requests.RequestError - Expected OAuth 2 access token
We are getting the following error in c# when executing Google.Apis.Gmail.v1.StopRequest.Stop. **NOTE: this is code that has ran for 2+ years and suddenly stopped working around 3/23/2022. I am ...
1
vote
1
answer
100
views
check if file is opened Google Drive API
I need to write inside a file located in a folder of my account in google drive and I wrote a desktop application in VB.net using Google Driver API v3. Since that me and my friend use the same account ...
0
votes
0
answers
31
views
Adding Notes value to Google Contact [duplicate]
I am using using Google.Apis.PeopleService to create a new contact under my account and everything works fine.
But there is only one thing i can't get - How to add Notes to a contact? I couldn't find ...
5
votes
1
answer
253
views
Why is my UpdateFile getting a null in the response in google drive api v3 using c#?
I have an application that is written in C# so that it can be a stand-alone .exe with parameters passed in via cmd at runtime. I am trying to update a file in google drive without changing the fileid ...
0
votes
1
answer
62
views
Google API - C# - GmailService - Error "Unable to validate id_token"
I am having an error when I try to access my gmail messages, even though I pass the permission type, which allows access to the readMessages.
What I want to do and am having trouble doing:
Access ...
0
votes
0
answers
175
views
Gmail API handle large amounts of requests
I am trying to take some benchmarks for how long it takes to some operations on Gmail messages with a mailbox containing a large amount of emails. I am using OAuth and a Gmail account with over 200GB ...
1
vote
1
answer
229
views
Using Google Sheets API without a cloud platform project
I need to save some data to private Google Sheets as part of my pet project. I have reviewed the documentation and I am a bit confused about having to create a cloud platform project for such small ...
2
votes
1
answer
981
views
Authorization Error Error 400: redirect_uri_mismatch on C#
I wanted to upload files to Google Drive using Google Drive API in ASP.NET MVC C#.
While doing that I have followed the below URL:
https://qawithexperts.com/article/asp-net/upload-file-to-google-drive-...
1
vote
2
answers
192
views
Google APIs Adding a contact using PeopleService
I have a question about how correctly add a contact to Google Contacts using Google API.
For authorization I use external Json file Generated.
When I execute it , it doesn't give any mistakes but No ...
1
vote
1
answer
179
views
Get Calendar ID of Event in Google Calendar API C#
Is there a way to get the Calendar ID of an event in Google Calendar through the Event class?
var credential = GoogleWebAuthorizationBroker.AuthorizeAsync(
new ClientSecrets
{
...
2
votes
1
answer
106
views
Get event ID of Google Calendar event after it has been created C#
I've written some code to add an event to Google Calander:
var credential = GoogleWebAuthorizationBroker.AuthorizeAsync(
new ClientSecrets
{
...
0
votes
0
answers
155
views
How to set `Accept-Language` HTTP header using Google's .NET API wrapper?
I am trying to use the Google People API wrapper in .NET to list all contacts of the logged in user. It works, but I noticed 'o' is substituted for the Norwegian letter 'ø'.
On closer inspection, the ...
1
vote
1
answer
285
views
Insert event to specific calendar in Google Calendar C#
I have written an application that will add an event to Google Calendar.
This works fine but is there a way that I can add this event to a specific calendar rather than the primary?
This is my code:
...
1
vote
2
answers
571
views
What is the simplest way to create event in G calendar using C# / .NET
! Solution added by me below !
Issue:
I am building a windows form using c# / .NET and I want to add a functionality to add a event in my personal google calendar. I've been researching over the ...
1
vote
0
answers
41
views
Google Calendar v3 with Umbraco 8
So I am trying to add functionality so when I create or update an event page in Umbraco, it will be created or updated in Google Calendar.
But according to the documentation on Google Calendar API I ...
0
votes
1
answer
84
views
Error 400: redirect_uri_mismatch How to format my URI?
I am trying to use Google Drive's API on my Web Application. I am trying to use localhost as my URIs. These are my URI and redirect URIs:
I am still, however, getting the following message, what can ...
0
votes
1
answer
108
views
Google API Client returning 404 not fund
I am trying to get the best searches from google, using keyword, and GoogleAPI, but It is always returning "System.Net.WebException: 'The remote server returned an error: (404) Not Found.'"
...
2
votes
2
answers
230
views
Add Firebase Log Events (Analytics) in dotnet core
I have android and iOS mobile mobile applications where am able to use Firebase Log Events(Analytics). The same way need to add some more Event logs from backend using dotnet core. Is there way to use ...
0
votes
1
answer
135
views
How to validate Hangouts Chat webhook token in C#
I am working on a pretty simple chat bot with an ASP.NET webhook to process responses. I am not having any issues sending or receiving messages, but I am a little bit stuck on validating the Bearer ...
0
votes
0
answers
46
views
How to set redirectURI within a WinForms application?
I have a VB.Net WinForms app that uses Google GMail service for sending e-mail on behalf of the user, pulling the users default signature data to add to the e-mail. Trying to find end-to-end examples ...
1
vote
1
answer
90
views
Google Calendar API Production Launching questions
I am building a chatbot using FreshDesk that will connect to Google Calendar, so I
go to Google Console API and create a project
add the google calendar API service to the project
get the credentials ...