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
5
votes
4 answers

How to call the function from other node js file

These codes are stored in separate file and I tried to call the get method from this file to another nodejs, but I am getting only [Function] as a out put. Can any one tell me how to call the get method from this file to another node js file 'use…
VG__
  • 533
  • 2
  • 6
  • 16
5
votes
1 answer

GoogleAPI NodeJS: calendar.events.watch gets error push.webhookUrlNotHttps or pushWebhookBadDomain

I have followed all the setups required in https://developers.google.com/google-apps/calendar/v3/push (I think) and I'm trying to register my callback URL to watch events, with this code: calendar.events.watch({ auth:jwtClient, resource:…
5
votes
2 answers

Errors on grunt build using google-api-nodejs-client with webpack

I'm using https://www.npmjs.com/package/googleapis in a ReactJS Webpack app. It does have a warning that it's an alpha version, so problems are to be expected, and here's the one I'm having. npm install googleapis --save installed googleapis ok,…
5
votes
1 answer

NodeJS Google Api client: how do I know the access token is expired?

I am working on Nodejs Google Api client Oauth process. I follow what the code example for oauth, https://github.com/google/google-api-nodejs-client/blob/master/examples/oauth2.js. I have one question. How do I check if the access token is expired…
user3203518
  • 51
  • 1
  • 3
5
votes
2 answers

Registering Glass Timeline Notification with Node

I'm trying to register TAKE_A_NOTE with the 'mirror-api-subscription' event listener. I'm not having any luck: I can launch take a note with "my app", however, there's no console log that the event has been recognized. I would like to recognize…
5
votes
1 answer

Mirror API and Node.JS

I have a node.js program that I am trying to work with the googleapis module (https://github.com/google/google-api-nodejs-client) version 0.2.5-alpha. I can make calls using the raw HTTP without problems, so I know I am white listed for the API, I…
Prisoner
  • 49,922
  • 7
  • 53
  • 105
4
votes
1 answer

How To Use Google Drive API Without OAuth Using Nodejs?

After searching stackoverflow, blogs, YouTube, Google Drive API doc, e.t.c, most of the examples show how to use the Drive API using OAuth. I want to build a Nodejs application where the Nodejs Server will create Spreadsheets on Google Drive only…
4
votes
0 answers

Can GKE Workload Identity be used with Domain Wide Delegation?

We've been using the Google Directory API to get the profile of our users, on an internal app. When we authenticate, we've been using a json keyfile for a service and the google-auth-library JWT class. The service account has Domain Wide Delegation…
4
votes
1 answer

Scope of Response of API after function call in node.js

Post API format { "first_name": "sakshi", "last_name":"agrawal", "username":"sakshiagrawallllllll", "is_active":"1" } Response from POST API If the user is already registered, then this will be the format of response. { "code":…
4
votes
0 answers

Error: No access, refresh token or API key is set. Google Youtube API V3

I am going to get my subscription list with the help of the YouTube api. I wrote this piece of code. const { google } = require('googleapis'); const oauth2 = google.oauth2('v2'); const express = require('express') const app = express() const port…
4
votes
1 answer

How to connect Google Cloud Bigquery with NodeJS using APIKey

I am trying to insert, delete, search and update in google bigquaey using node js. I have followed up the all documents in google could. But no where its mentioned, how to connect - So I have created this, -- How to connect GCP BigQuery with NodeJS.…
4
votes
1 answer

Gmail API's access token expiration and creation

I've been using google API to send emails from the server in my node.js project. I've setup credentials and created a refresh token and access token and have been using the same for over 6 months like so. oAuth2Client = new…
4
votes
1 answer

How do i make post request through google-auth-library?

I am successfully able to make GET requests to a service hosted behind IAP, but am running into issues when making POST requests the same way. Also, I was not able to find any documentation for the same. All examples seem to be for GET requests.
4
votes
1 answer

Google Calendar API to get the working hours data from google calendar settings

Can we get the Working hours data from google calendar settings. I have gone through the APIs of calendar : https://developers.google.com/calendar/v3/reference/settings/get but didn't get the required data with this. Attaching the image for…
4
votes
0 answers

How to stop streaming in google speech to text API and start back when i needd?

Now in google speech to text API i am doing everything i wanted except for stop when i want now i have tried to call function stop(), pause() in the API and eight on of the is not working const record = require('node-record-lpcm16');// Imports the…