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
9
votes
1 answer

Upload APK and set track for publishing

I am trying to set a new track and upload APK for publishing using nodejs... But no APK is uploaded nor is there a track set. But the results from the validation and all the other steps are exactly as I expect(according to API). The script succeeds,…
wolfenrain
  • 309
  • 1
  • 9
9
votes
2 answers

Whether to use googleapis or google-cloud library for node js

I see there are two available libraries. I am wondering what are the differences? Are they both officially maintained by Google? https://www.npmjs.com/package/googleapis https://www.npmjs.com/package/google-cloud
user699681
  • 213
  • 4
  • 10
9
votes
0 answers

Google Sign-in Server Side Authentication for Android in Nodejs

I have created an Android app, which requests "Server auth code" from the user and sends it to Backend which is in Nodejs. Now, I want to authenticate this token with the GoogleSign In API and get 'access-token' and 'refresh-token'. I can see a…
user2379271
  • 613
  • 2
  • 7
  • 15
9
votes
1 answer

should OAuth2Client be created per request or cached per user?

I'm using the node version of the google api client. i.e.: google-api-nodejs-client. As part of this I'm setting up oauth-flow (the 'google webserver' flow to be exact.) As part of authentication this consists of doing calls like: var oauth2Client…
Geert-Jan
  • 18,623
  • 16
  • 75
  • 137
8
votes
2 answers

Function not found: group_concat

I'm interesting in execute a query using the "group_concat" BigQuery function. When I execute the query directly in the BigQuery interface, the query ends successfully, but when I try to execute that query via Node js, the bellow error…
bsmarcosj
  • 1,590
  • 1
  • 11
  • 21
7
votes
1 answer

Understanding node.js require('fs') vs require('fs').promises;

I have two methods. The first one reads a file and writes to that file just as plain text. The second one writes a file as a stream. In order to get this to work I have had to add fs twice in require. const fs = require('fs').promises; const fs2 =…
Linda Lawton - DaImTo
  • 106,405
  • 32
  • 180
  • 449
7
votes
3 answers

NodeJS, How to get new token with refresh token using google api?

Following google api doc https://developers.google.com/sheets/api/quickstart/nodejs, could not find a way to get a new token using refresh token with the oauth2 client. The doc says: "The application should store the refresh token for future use…
7
votes
3 answers

google cloud authentication with bearer token via nodejs

My client has a GraphQL API running on Google cloud run. I have recieved a service account for authentication as well as access to the gcloud command line tool. When using gcloud command line like so: gcloud auth print-identity-token I can generate…
7
votes
1 answer

Is there a way to send appengine mail with nodejs without use an intermediary service like sendGrid or mailJet

I am a Python developer, but the circumstances of a project I am working on now, oblige me to find a solution in Node.js This is the easy python code to send mail but, is there a google app engine way like this in nodejs without use an…
7
votes
5 answers

How to install Node Version Manager(NVM) without admin rights

I have no admin rights in my windows machine. Can I install NVM without admin rights? I tried using the environment variable path setup, but its not working in my case.
7
votes
1 answer

Google Maps Distance Matrix Nodejs timeout

We have an application that depends on Google maps distance matrix API to calculate distance and time between two points. It's a nodejs application. We have been using this Google Maps Node.js Client The application has been working okay. Now it…
Alec BW
  • 243
  • 2
  • 18
7
votes
1 answer

(still unresolved) Authorizing Web App access to user Google Calendar's on Client and Server side? (with Firebase and Google API)

I have a Firebase web app, and want that any user can login and authorize my web app to access his Google Calendars (read/write) on Client AND Server side (to manage calendars when the user is online, and when he's offline). On Client side. After…
7
votes
1 answer

OAuth 2.0 client secret for Electron

I'm implementing OAuth 2.0 in Electron to use the Google Calendar API and realize that a client_secret is required. Searching around I see two options: Hard-coding / Packaging the secret inside the Electron App. However, since Electron Apps…
7
votes
2 answers

oauth2Client.getToken missing refresh_token

I have a small express server that has two routes. Then it writes the json tokens to a file (I know very insecure). For some reason there's no refresh_token. In the docs theres a comment that offline for access_type gets refresh_token, which is set…
ThomasReggi
  • 55,053
  • 85
  • 237
  • 424
7
votes
5 answers

Gmail API not respecting UTF encoding in subject

In an app I'm helping develop we've added in the ability for a user to invite other users and personalize the invitation email, and then send it via Gmail's APIs. I'm encoding it using base64 as the docs state, and the emails we send are formatted…
josh
  • 9,656
  • 4
  • 34
  • 51
1
2
3
54 55