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

returning values from async scope in node js

I am definitely not seeing this straight so am looking for a quick hand. I've been googling about and not found much that has helped. Set the scene: I have a node app that uses the 'googleapis' package. Now, I have that working fine and returning…
0
votes
2 answers

How do I fetch messages with the NodeJS Gmail API?

I have to create a small program in NodeJS that will check the user's account for new messages and notify them via SMS (using Twilio) if they have new mail. Unfortunately, I'm having troubles getting the fetch functionality to work. I have searched…
Sargento
  • 1
  • 3
0
votes
1 answer

"Request Entity Too Large" Inserting new YouTube Reference

I'm trying to upload a Reference video to YouTube, I've already created the Asset, but whenever I try inserting the Reference I get Request Entity Too Large error, although the file I'm uploading is 3.4MB while the API documentation states that the…
AboulEinein
  • 1,101
  • 3
  • 13
  • 27
0
votes
1 answer

Google's oauth2client.getToken() incorrectly returns when called with Q.ninvoke()

I'm using Google's node.js library to retrieve access tokens to authenticate a user. If I call the following method using a node-style callback, returned tokens is an object as I see in official examples: oauth2client.getToken(code, function(err,…
0
votes
3 answers

Displaying the angularjs posted data at node js using express

At the angular side i have passed data using post method. var data = { 'id': mydata.google_id, 'token': mydata.token, 'email': mydata.email, 'name': mydata.name }; $http.post('http://localhost:3000/login1',data,config) …
0
votes
1 answer

Upload Youtube Video is successful but no video on youtube channel

Last week I was able to upload a video on my youtube channel. Today I've tried doing the same thing without any success. Code wise I'm not getting any errors whatsoever. Here is the result for my yt.videos.insert({/* video info here and media*/},…
kemicofa ghost
  • 16,349
  • 8
  • 82
  • 131
0
votes
0 answers

Generate Gmail authentification token

I am trying to generate a Gmail authentication token to use in my NodeJS server for sending email notifications. Right now I have something like this (I'm not the one who did that) but I need to change the email address and I'm having issues with…
daydr3am3r
  • 920
  • 4
  • 12
  • 31
0
votes
1 answer

AWS Lambda function returning "Cannot find module 'bl'" yet it is present

Currently my barebones function works locally, and returns an authtoken. When I zip the contents of my folder (not the folder itself, an earlier gotcha) and upload/test on Lambda, I get an error "Cannot find module 'bl'", which seems to be coming…
0
votes
1 answer

Get 'n' number of search results using google.customsearch('v1')

By default, it gives 10 results. How can I have n number of results? Here is my code so far (pretty much same as in their example): var google = require('googleapis'); var customsearch = google.customsearch('v1'); const CX = '***'; // search…
Rahul Desai
  • 15,242
  • 19
  • 83
  • 138
0
votes
1 answer

"Socket Hang Up" / ECONNRESET Error while uploading to Google Cloud Storage

We're using Google Cloud Storage to store pictures uploaded by our users. For some reason, it stopped to work today. var googleapis = require('googleapis'); var GoogleAuth = require('google-auth-library'); var googleAuth = new GoogleAuth(); var…
0
votes
0 answers

Google Plus sharing using NodeJS

I want to share some data on google plus from my Website. Facebook and twitter is completed using NodeJS (Using npm twit and fb). in FB var FB = require('fb'); FB.api('me/feed', 'post', { message: "something"}, function (result) { } and in…
Haris Aju
  • 79
  • 1
  • 6
0
votes
1 answer

Google datastore.lookup in Node.js returns no results

I'm trying to run a simple lookup against my Google datastore data via the google-api-nodejs-client JS plugin. When I run this lookup using Google's "try it now" tool, it works fine: Request POST…
0
votes
1 answer

Error every time I run datastore.runQuery: one of fields Query.query and Query.gql_query must be set

I'm trying to run a simple query against my Google Cloud datastore using google-api-nodejs-client. I want to query for all entities matching a given kind. When I run this query using the "Try it now" tool it works fine: Request POST…
0
votes
2 answers

emitting a nodejs event when an event on google calendar is added or updated

Is this possible to emit a nodejs event when a Google calendar event is added or modified? On my nodejs server, I can get/list all the events on the calendar. But I would like to retrieve the events based on the nodejs event rather than checking it…
0
votes
1 answer

Prediction request end up with "invalid data" errors

I get errors when posting prediction requests, but when posting the same requests from the online interface (from Google's API reference page) works well. I have also posted a new issue on the Git repository, but it seems that no-one even looks at…
Ilan lewin
  • 1,599
  • 1
  • 14
  • 24