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
0 answers

angular2 google-auth-library Module not found: Error: Can't resolve 'child_process'

I'm trying to use google api in a new angular2 project. As the documentation suggest, I have install googleapis (npm install googleapis --save) in a new project created with angular-cli. When I start, I have the following errors : ERROR in…
Adrienpe
  • 1
  • 1
  • 1
0
votes
1 answer

Gmail API NodeJS code sample doesn't work?

I was using the Gmail API Node Quickstart tutorial here: https://developers.google.com/gmail/api/quickstart/nodejs But it doesn't seem to work. Specifically, the json file I got for registering my application is not in the structure this code sample…
0
votes
1 answer

Getting refresh_token using googleapis lib

So I have Google Oauth flow setup using googleapis lib, and I don't seem tog et a refresh_token after I use oauthClient.getToken(code, ..). It only returns the access_token and the id_token. Here's my result from the code: { access_token: "...", …
0
votes
1 answer

Gmail API - unable to fetch messages from users in domain using google.auth.jwt

I am trying to fetch all emails under our company domain. I am using Node.js client library. In my last approach I used Oauth method as documented in quickstart guide. It was suggested that I should use JWT to authorize, but I am still unable to…
Kunok
  • 8,089
  • 8
  • 48
  • 89
0
votes
3 answers

Will huge amount of callbacks break script or continue whenever enough RAM is available?

I have a function that fetches thread (gmail conversation) ids from database and then asks Google API for all data for each thread id. Once it receives a thread object, it stores it to database. This works fine for my inbox which has ~1k messages.…
Kunok
  • 8,089
  • 8
  • 48
  • 89
0
votes
1 answer

'refreshToken_' error with "promisified" Google Analytics's jwt client

I'm trying to call Google Analytics API within an express/React/d3 project. I'm getting close to make all this work however I still need to deal with async callback on the jwtClient to make the GA API call. As you will see in my code, I'm using a…
Simon Breton
  • 2,638
  • 7
  • 50
  • 105
0
votes
1 answer

Cannot read property 'join' of null error with node and GA analytics api

I'm trying to use Google Analytics Core Reporting API from Node.js by following this tutorial http://www.2ality.com/2015/10/google-analytics-api.html. I'm launching the script directly from my terminal with babel-node mygaapiscript.js. but I've got…
Simon Breton
  • 2,638
  • 7
  • 50
  • 105
0
votes
0 answers

When OAuth2 Google API script is called from other script, it is not possible to validate it

Whenever OAuth2 Google API script is called for the first time it requires authentication. node googleAPIscript.js It simply provides link and asks for input. The given link contains generated string that should be pasted into the input. Now that…
Kunok
  • 8,089
  • 8
  • 48
  • 89
0
votes
0 answers

Deploying Python on Nginx Server Google Cloud

I am building an application in Node.js. That application runs a child process which includes a python script. I deploy my application in gcloud which shows 502-Bad Gateway (ngix). Help will be more appreciated. Here is my code..…
iamsuman
  • 1,413
  • 19
  • 32
0
votes
1 answer

can i transfer money from stripe to customer card?

i am using stripe API for payment getaway and i get charges from customer using card details , now i want to transfer some money to the customer who have card detail . i have try one transfer that can done using bank detail but i don't want to…
Alex
  • 818
  • 1
  • 8
  • 17
0
votes
1 answer

How to use Drive API to impersonate a user without Google Apps for Work

My organization has a project that is using Google Drive to store files. What we want to do is to show the contents of the Drive on a website. I'm not really sure how to go about this. Most of the examples are showing authenticating the user…
0
votes
1 answer

Issue with access and refresh token

I am using drive.files.insert method from https://github.com/google/google-api-nodejs-client and it worked properly but I don't know how can I refresh the token and also where can I get the refresh token. Meanwhile, I am taking the token from…
0
votes
0 answers

Which Google API's require that you impersonate a user and which require that you do not?

Using a service key: In the Gmail API, for example, I must impersonate the user to access their email. To access their calendar, however, I get an “error: unauthorized client” unless I remove the line impersonating the user. I then have to instead…
Kenmore
  • 1,525
  • 3
  • 16
  • 39
0
votes
1 answer

How do I use Google APIs as a specific user server-side? Node.js

I have a form on a website that needs to check my calendar to see what times are available, and then later when it's submitted it's going to send an email. I created a service account in the API console but I have no idea how to grant it access to…
Kenmore
  • 1,525
  • 3
  • 16
  • 39
0
votes
1 answer

Can't retrieve the play store reviews for my app

I am trying to get the reviews for my app from the playstore using the new reviews api from the android publisher service. The app key is me.jadi (https://play.google.com/store/apps/details?id=me.jadi) as you can see it have reviews posted for…
djandreski
  • 334
  • 1
  • 4
  • 24