Skip to main content
We’ve updated our Terms of Service. A new AI Addendum clarifies how Stack Overflow utilizes AI interactions.
Filter by
Sorted by
Tagged with
0 votes
0 answers
119 views

Google Calendar API refresh token stops working after 1 hour – requires user to reconnect

I’m integrating Google Calendar using OAuth2. During testing, I noticed that refresh tokens stop working after about an hour. Issue behavior: If I connect the calendar and use the token to create a ...
Praveen G's user avatar
0 votes
1 answer
73 views

Ownership transfer of Google Drive files using the node api fails with "Missing required nested field: resource"

With the Google APIs Node library, I have been trying to get the datatransfer api going, to transfer ownership of all the files and directories in Drive that a quitting volunteer might have created. ...
spodell's user avatar
  • 176
0 votes
2 answers
112 views

google admin api for Node, users.list fails with http 400: GaxiosError: Invalid Input

I can run the users.list query and get the data response on the Api explorer for the Directory API (https://developers.google.com/workspace/explore?filter&discoveryUrl) and the Javascript query ...
spodell's user avatar
  • 176
0 votes
0 answers
94 views

Google Drive API Webhooks - single change in a shared drive causes notifications on all other drive webhooks

Currently running into an issue where when I apply a change to a shared drive, rather than just the shared drive's watch channel getting notified, all 4 channels get notified. Causing 4 webhooks to ...
Kim's user avatar
  • 1
0 votes
1 answer
77 views

Unable to use Javascript Wallet client with a service account from different GCP project

I am attempting to use the Google Wallet node.js api with a service account. The service account comes from a different GCP project. I have granted the service account the appropriate role so that it ...
Paulw11's user avatar
  • 116k
0 votes
2 answers
275 views

Refreshing Google access token causes loss of oauth scope

I have a scenario where I am obtaining access/refresh tokens via oAuth consent. When the access token expires, the refreshed token returned after refresh is losing scopes previously acquired. Summary ...
Jason Polites's user avatar
0 votes
1 answer
147 views

How do you debug GRPC error when there is no details?

I have already found a discussion regarding better debugging for GRPC: How to debug grpc call? but I am running into a scenario where even after adding those flags GRPC_VERBOSITY and GRPC_TRACE, I ...
Visrut's user avatar
  • 762
0 votes
0 answers
10 views

Google auth refresh tokens expiring after a few days [duplicate]

We use the youtube API on behalf of our users, but after 7 days some users report having to re-authenticate and generate new refresh and access tokens. Our app is in production mode, so we are ...
john's user avatar
  • 1
0 votes
0 answers
169 views

invalid_grant using Gmail API

I have a node.js backend that uses gmail API to retrieve user emails. The problem is that for some users who recently sign up to use the app they get an "invalid_grant" error after some time....
Chris's user avatar
  • 103
0 votes
1 answer
203 views

Gmail with Nextjs 15 Reply conversation

i working with Gmail in Nextjs 15, i can get all my email, sending email, but my reply has a problem.when i reply a mail, in my mail conversation i can fetch every previous mail which is fine. but the ...
Peter Just Peter's user avatar
2 votes
2 answers
209 views

TypeError with Firebase Functions Auth Trigger in v6.1.0

I'm trying to set up a Firebase Auth trigger for user deletion using Firebase Functions v6.1.0, but I'm getting a TypeError. Here's my minimal reproduction case: const functions = require('firebase-...
thierryb's user avatar
  • 3,758
0 votes
1 answer
106 views

Set A Bearer Token when using @google-cloud nodejs library

So I have an electron app that performs: const { v2 } = require('@google-cloud/speech'); ... client= new v2.SpeechClient({ apiEndpoint: `us-central1-speech.googleapis.com`, keyFilename: ...
I am L's user avatar
  • 4,680
1 vote
0 answers
62 views

elapsedVideoTimeRatio does not return 100 datapoints google api

I'm using the the google api to measure the retention and acccording to their docs it should always return 100 datapoints but I'm getting lower than that, some as low as 71? Does anyone else have a ...
Jesper Hägglund's user avatar
2 votes
1 answer
307 views

Getting "Precondition check failed" when calling gmail api using a service account that impersonates a user

I want to create a nodejs script that uses a service account to call gmail api on behalf of users of a domain. The service account has domain wide delegation enabled, the domain's workspace admin ...
Chirag Srinivas's user avatar
2 votes
1 answer
121 views

Unexpected rate limit error while uploading videos using YouTube API

I'm using google YouTube API to programmatically upload videos to YouTube using my node.js server I've installed googleapis npm package on my server, and authenticate each request with OAuth2 google ...
fullstack's user avatar
  • 834
1 vote
1 answer
442 views

How to create an oAuth2Client using the @googleapis/oauth2 subpackage

I am trying to move from using the entire googleapis package in my firebase cloud function (nodejs) project to using only the sub packages I need. This is what I have that works currently: const {...
MadMac's user avatar
  • 4,993
0 votes
1 answer
1k views

Permission monitoring.timeSeries.list denied (or the resource may not exist)

I am working with google cloud project (Nodejs server). I need to collect the metrics "monitoring.timeSeries.list" from google cloud using "googleapis". When i try to request API ...
Dat's user avatar
  • 1
0 votes
1 answer
97 views

"emitWarning is not a function" when trying to authenticate with google-auth-library

I'm trying to get two Cloud Run services in the same VPC to communicate with each other. I'm following this tutorial. The section I linked is the one I'm having problems with. The faulty code right ...
Tuma's user avatar
  • 527
0 votes
1 answer
41 views

Append Inserting in Random Rows

I'm inserting data into sheets using append, but the new data ends up being inserted in random positions. Sometimes at the bottom, sometimes at the top. Apparently sometimes in the middle also, ...
Dan_J's user avatar
  • 175
0 votes
1 answer
2k views

How to Create an AI Chatbot with Google GEMINI using Node.js?

I am currently working on a project where I need to create an AI chatbot using Google’s GEMINI. I have chosen Node.js as my development environment. While I have some experience with Node.js, this is ...
sreelekshmi's user avatar
0 votes
1 answer
60 views

Receiving a 403 for users.messages.send despite seemingly having adequate scopes

My organization maintains an app that has the https://www.googleapis.com/auth/gmail.send scope. Today, when attempting send Gmail messages on behalf of our users, we received a 403 error from the ...
Harry Shapiro's user avatar
0 votes
1 answer
195 views

How to add an api key to discovery loaded beta endpoint for the google js client library

I'm trying to get support for the file upload endpoint that is part of the betav1 version. Which hasn't been added to the generative ai js library yet. I can load the discovery doc and call the file ...
Linda Lawton - DaImTo's user avatar
4 votes
2 answers
8k views

Model not found when using gemini 1.5 when I have access to 1.5

When i run the code below i get the following error. [404 Not Found] models/gemini-1.5-pro-latest is not found for API version v1, or is not supported for GenerateContent. Call ListModels to see the ...
Linda Lawton - DaImTo's user avatar
0 votes
0 answers
164 views

Chrome Verified Access API returning empty body or PERMISSION_DENIED

I'm trying to implement the verified access API but I have ran into an issue when attempting to verify the challenge response. I believe this is a bug with the actual google API or I am seriously ...
Patrick McManamon's user avatar
1 vote
0 answers
230 views

GCP Application Default Credentials conflict

I have two projects running locally which both use Application Default Credentials. One is in Spring Boot and one is in NodeJS. They use different projects on my same GCP account. The NodeJS one was ...
Chris A's user avatar
  • 1,140
0 votes
1 answer
127 views

Do Google Cloud API Libraries support Oauth2 on behalf of other users?

I'd like to access the Google Analytics Admin API on behalf of other users. I have a valid oAuth2 access token from the Oauth2 dialog flow with authentication window popup. Google offers new Cloud ...
Eduscho's user avatar
  • 489
1 vote
1 answer
207 views

Google Calendar API expiration time for refresh_token?

In my nodejs server I am using '@google-cloud/local-auth' library to create events in calendar, when I authenticate to google calendar it returns me a client with refresh_token. What is the expiration ...
Julia Gatina's user avatar
4 votes
2 answers
4k views

Vertex AI GoogleAuthError in nodeJS

I have a web server with one endpoint deployed on Heroku. Server purpose is to interact with Vertex AI gemini-pro LLM. Localy everything wors perfect because I am using a gCloud CLI auth but I want to ...
Roman's user avatar
  • 43
0 votes
1 answer
49 views

When attempting to delete a product, the associated files (image and PDF) in S3 are not getting deleted in node js

const deleteFilesFromS3 = async (fileKeys) => { const s3 = new aws.S3({ accessKeyId: accessKeyId, secretAccessKey: secretAccessKey, region: region, }); // Iterate through ...
Sajid Ishaq's user avatar
1 vote
1 answer
639 views

Do I need to refresh the "access token" when authenticating to Google APIs as a Service Account?

I am writing a NodeJS app on Google AppEngine that uses a Service Account (SA) to call a Google API (specifically the Drive API) to access a resource. I've accessed Google APIs before using OAuth2, ...
Certify'em Developer's user avatar
1 vote
1 answer
101 views

Can't send an email from service account, get 400 Precondition check failed error

Trying to send an email using a service account with role owner within my project. I keep getting a 400 error that says Precondition check failed. const sendEmail = async () => { const auth = new ...
Michael Lafortune's user avatar
0 votes
2 answers
482 views

How can I format a part of a Google sheets cell value using googleapis?

I'm using https://www.npmjs.com/package/googleapis to insert data. One of my cells should contain multiple links, let's say https://foo https://bar This is easy to do manually and I can query ...
Joel Peltonen's user avatar
0 votes
1 answer
631 views

how to read an external public shared calendar via google api

I have the following basic code to read some calendar events. The calendar is publicly shared from a normal private google user. To use google api, I set up a service account with owner role, just to ...
Bertuz's user avatar
  • 2,618
0 votes
1 answer
189 views

why a service account can't access a public shared calendar for listing events?

I'm using deno and https://googleapis.deno.dev/ to try to get some events from a publicly shared calendar. Basically, this is the code: import { Calendar, auth } from "https://googleapis.deno.dev/...
Bertuz's user avatar
  • 2,618
0 votes
1 answer
99 views

How do I use service account in deployed code?

I have used the IAMCredentialsClient to generate an access token for the service account on a project const client = new IAMCredentialsClient(); const [token] = await client.generateAccessToken({ ...
Chris A's user avatar
  • 1,140
-2 votes
1 answer
1k views

Error when i use google service account : invalid jwt

I have an application basically for sending documents to the drive that has a login with Google, but when sending the documents I want to use the Google service account but I receive several token ...
John Albuquerque's user avatar
0 votes
1 answer
395 views

Google Drive API creating 0-byte files

I'm trying to create a file using the Google GDrive API using the following Node.js example from the documentation under section Perform a multipart upload: /** * Insert new file. * @return{obj} ...
John's user avatar
  • 1
0 votes
0 answers
206 views

DialogFlow Detect Intent Request from NodeJS doesn't change data

I do detect intent request from NodeJS. I have done the same using Postman and it works to change the currentPage (I am making long-lasting session). But from NodeJS, the Dialogflow gives response but ...
Viz's user avatar
  • 23
0 votes
0 answers
271 views

PERMISSION_DENIED: Request had insufficient authentication scopes. | GCloud Analytics API | Ubuntu | NodeJS

I am working with Google Analytics API. My code is working locally. But it is not working on the Ubuntu Server instance. I have checked and done the following steps correctly: ADC is signed in using ...
shivam chawla's user avatar
3 votes
1 answer
1k views

How to prefer ipv4 for google-auth-library requests in nodejs on ubuntu 20.04

As of later versions of nodejs, ipv6 DNS resolution is preferred. In previous machines, I had simply disabled ipv6 for outgoing requests, but here it isn't possible because fetch() in node would fail ...
LAZ's user avatar
  • 544
2 votes
0 answers
239 views

Save Google Authentication with GAPI & GSI

I am using the Google JavaScript quickstart to connect to the Calender API. As in the example I use the http server on port 8000 npx http-server -p 8000 So http://localhost:8000 works as intended. ...
Fylus's user avatar
  • 34
1 vote
1 answer
187 views

Google Drive API problem connecting with NodeJS

I am trying to create a gallery page in my NodeJS app. However, there it seems like something isn't working with the connection. The idea is to get all photos from a Google Drive folder that is public....
Kristiyan's user avatar
1 vote
0 answers
115 views

Wrong public key type error when calling verifyIdToken in google-auth-library for Node.js

I am using google-auth-library to verify sign in with google credentials server side that I get from users who sign in with google on my site in line with the method described here. However, calling ...
Marcel Madden's user avatar
0 votes
1 answer
2k views

how to get google analytics report api ga4 for node js

i have installed a google analytics ga4 in my mobile app now i need to fetch the GA report into node.js using google analytics report api. i have read the google analytics report document but the did'...
Madhukar.j Madhu's user avatar
2 votes
1 answer
264 views

How to get 'sub' or id_token from Google API's oAuth2Client in NodeJS

I am using oAuth2Client to access a user's Google Analytics property. Their refresh token is saved for future use. However, because the user could add multiple properties, I need to assign the ...
Matthew Michaud's user avatar
1 vote
1 answer
781 views

Retrieving the contents of a folder by folder ID using Google Drive API

I want to retrieve the contents of a specific folder on Google Drive using node.js and the googleapis and google-auth-library packages. The problem is that while the folder exists and can be found ...
Joey's user avatar
  • 1,676
2 votes
1 answer
504 views

Why my filters not working in the google analytics 4 app script code which I have written below? How can I fix it?

function runReport() { const propertyId = '359325548'; // Your GA4 property ID try { // Metrics const sessionsMetric = AnalyticsData.newMetric(); sessionsMetric.name = 'sessions'; ...
Roopam's user avatar
  • 23
0 votes
1 answer
53 views

append function of gsheet api (nodejs) adding data at weird places in the row

My gsheet has more than 26columns and only 3 to 4 of them have headers (and unequally spaced too) now for some reason the append function is adding values to the new row after the end of the previous ...
Asutosh Rout's user avatar
0 votes
1 answer
171 views

GCP / Firebase Functions: "Some functions failed to load"

I'm getting errors for the Firebase functions. First I deploy the function from Firebase cli it's deploying successfully but when I open the Firebase functions I'm getting the below error Even When ...
Muhammad Ammar's user avatar
0 votes
0 answers
778 views

Formatting Gmail messages fetched using the Google API in Node.js

I am using the Google API library in Node.js to fetch emails from Gmail. The code snippet below demonstrates how I retrieve and extract data from the fetched message: const gmail = google.gmail({ ...
Suliman Khan's user avatar

1
2 3 4 5
18