Questions tagged [google-api-nodejs-client]

google-api-nodejs-client is Google's officially supported node.js client library for accessing Google APIs, it also supports authorization and authentication with OAuth 2.0.

This client comes with an OAuth2 client that allows you to retrieve an access token and refreshes the token and re-try the request seamlessly if token is expired. The basics of Google's OAuth 2.0 implementation is explained on Google Authorization and Authentication documentation.

Note: This library is currently in alpha status.

The project's home page can be found on GitHub

816 questions
0
votes
1 answer

Display video 360 nodejs api createquery not taking params passed

I have the following code, trying to create a query using nodejs googleapis. let display360 = google.doubleclickbidmanager({ version: "v1", auth: oauth2Client }); let advertisersParams = { "metadata": { "dataRange":…
0
votes
0 answers

use google api to upload videos got error 'The user has exceeded the number of videos they may upload.'

I use googleapis nodejs client to upload my videos.for some reason, some videos have not been processed successfully, so I need upload them again,But I got some error: Error: The user has exceeded the number of videos they may upload. I googled…
zhang olve
  • 89
  • 1
  • 10
0
votes
1 answer

googleapis service account create new spreadsheet and grant permissions to user

I was able to create google sheet using service account, however unable to insert permissions to the sheet for users : function createSheet(jwt, apiKey) { const sheets = google.sheets({version: 'v4'}); var request = { resource: { …
0
votes
0 answers

Google Deployment Manager API - Updating yaml properties dynamically while creating the VM

We are using Deployment Manager API to create VMs in our NodeJS application. config.deploymentConfiguration.target.config.content = fs.readFileSync(yamlFile,config.encoding); var request = { project: config.projectId, resource:…
0
votes
2 answers

GCP VM Deployment: How to update yaml config properties dynamically while creating a VM

We have a nodejs application which creates VM on GCP using config file (.yaml) and templates. Now I want to update few properties in the yaml/template based on the user input from UI while creating the VM. How can we update the config properties…
0
votes
0 answers

Return a variable from a callback function

I have this code function LoadEmailIdsToCheck() { fs.readFile(config.googleCredentials, function processClientSecrets( err, content ) { if (err) { console.log("Error loading client secret file: " + err); // return; …
Seko
  • 13
  • 1
  • 9
0
votes
1 answer

How to download file mp4 from google drive api in nodejs

I'm building a server using nodejs and I want the server to response mp4 file downloaded from the google drive api
0
votes
1 answer

Google API auth via service key succeeds, but still gets "401 Login Required" on subsequent requests

I am using the service key method to authenticate with googleapis in node.js. I can authenticate successfully, but when I try to make a request after that I get a "401 Login Required" error. Here is the authentication code: const google =…
0
votes
1 answer

Method: spreadsheets.values.append TypeError: Converting circular structure to JSON

I've been using the Google Sheets API successfully. I've managed to use the spreadsheets.values.update, and spreadsheets.values.get methods with no errors. Today I've been trying to use the method: spreadsheets.values.append. This method simply…
0
votes
1 answer

How to upload a partial stream to Google Drive using Node.JS

I want to achieve the functionality where I can upload a certain part of a file to Google Drive. I am able to do this by splitting the original read stream into multiple write steams and then uploading them, but this technique isn't acceptable since…
0
votes
1 answer

google authentication using javascript fails

Trying to use the gapi function to implement a google authentication (oauth2) but the code below fails