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

How to get progress status while uploading files to Google Drive using NodeJs?

Im trying to get progress status values while uploading files to google Drive using nodeJs. controller.js exports.post = (req, res) => { //file content is stored in req as a stream // 1qP5tGUFibPNaOxPpMbCQNbVzrDdAgBD is the folder ID (in google…
AHmedRef
  • 2,555
  • 12
  • 43
  • 75
0
votes
1 answer

How to add files in Dropbox using from third party Application?

I want to upload files in admin's Dropbox account(eg: admin@xyz.com), When someone register on my site and upload files. The files should upload on Admin's Dropbox account. I am using nodejs, When I try to use API to upload files into Dropbox. It…
0
votes
1 answer

cloud function and jwt Google token request

I know that I should use the cloud function service account to access to my bigquery but for my specific needs I want to have the choice of my service account. So I decided to generate a token and use this token with the Google JWT client. The code…
0
votes
1 answer

How to tell which access token was refreshed

Using the following event, my backend is notified when an access token is refreshed. oauth2client.on('tokens', (tokens) => { if (tokens.refresh_token) { // store the refresh_token in my database! console.log(tokens.refresh_token); } …
Adam Bardon
  • 3,829
  • 7
  • 38
  • 73
0
votes
1 answer

Querying datastore entity with NodeJS client API by safe-Url

I'm trying to query datastore entity with NodeJS client API (https://www.npmjs.com/package/@google-cloud/datastore) given safe-url string provided by existing Go code. For some reason while other APIs (Go, Python,...) enable to decode/encode from/to…
0
votes
0 answers

Can't upload certain files to Google Drive?

I've created a simple application using Google Drive API v3 that takes a file that already exists on my server and uploads it to google drive. I've already been able to successfully upload a .json file without much of an issue. However, when I try…
0
votes
2 answers

when ever I run npm install, it fails

I am getting below error, while running npm install. Is there anything need to be done in nodejs or some other issue. I am getting below error, whenever I use npm, for example, npm install -g firebase-tools,npm install gulp. node-pre-gyp ERR! Tried…
0
votes
1 answer

Cannot run remote Google Apps Script app via node.js

I am having a problem running the following node.js to remotely execute a Google Apps script. the Google Apps script in itself is very simple, it is just: function addText(){ …
0
votes
0 answers

How to transform a multipart/related gmail content to html or pdf

I'm using https://github.com/google/google-api-nodejs-client to get a list of threads/messages from my gmail account I've got a multipart/related as the payload (body) of my email, how can I transform it to html or pdf? Is there a better easy to get…
Sibelius Seraphini
  • 5,303
  • 9
  • 34
  • 55
0
votes
1 answer

google content api how to use custom batch?

The google-api-nodejs-client doesn't have any documentation so I''m just referring to the raw api docs. While trying to use the client client.datafeedstatuses.custombatch({ entries: [ {merchantId: "myId", datafeedId: "myId", method:…
0
votes
2 answers

Google cloud datastore object trees from json

I'm probably missing something obvious, but I can't find a way to store a JSON object with descendants in such a way that the Datastore DB has a hierarchy of entities that can be queried. Example code: const Datastore =…
Oliver
  • 27,510
  • 9
  • 72
  • 103
0
votes
0 answers

How do i access my youtube brand account api?

Been trying to access YT analytics api for brand accounts through nodejs server using googleapis library but it returns forbidden. I have created a service account under my gmail manager id but no success.
0
votes
1 answer

How do we retrieve status of VideoAnnotation request in Google Cloud Video Intelligence API?

I am using following nodejs code to retrieve operation instance of video annotation request var vidOptions = { "inputUri": gCloudURL, "features": [ 'LABEL_DETECTION' ] }; …
0
votes
1 answer

nodejs client for google resource calendar APIs

I am working on a functionality where I need to fetch information about the meeting rooms which are treated as resource calendars. I am using googleapis node js client for other calendar related APIs, for e.g. events list, insert. I'm not able to…
0
votes
1 answer

How to update request id in real time using cloud firestore in node js?

Now i can able to get doc id and insert data into DriversCurrentBookings. When new currenUserRequest doc id is added in collection db, it should update in realtime in firebase (using cloud firestore) Here is the code used: var citiesRef =…