Server Side support?

76 views
Skip to first unread message

Marc Fargas Esteve

unread,
Nov 7, 2012, 6:51:38 AM11/7/12
to google-api-jav...@googlegroups.com
Hi,

I was just wondering if this library could be used serverside (ie: running inside Node.js), I do not see a reason why it shouldn't but just wanted to be sure :)

Also, in such case, I guess there'd be no issue in using a Service Account, right?

thanks,
marc

Killian Grant

unread,
Apr 28, 2013, 12:16:10 PM4/28/13
to google-api-jav...@googlegroups.com
Anyone? I would like to know if a service account would work as well.

Pat Hat

unread,
Feb 10, 2016, 2:50:15 PM2/10/16
to Google API JavaScript Client
I have the same question! Has anybody tried using the Google APIs client library for JavaScript in code running on a server where there is no user interaction (no user consent), using a Google Service Account?

Kurt Freytag

unread,
Feb 11, 2016, 1:36:47 PM2/11/16
to Google API JavaScript Client
I have, and it works fine.

I have, however, encountered serious problems when trying to get the library (googleapis) to run within AWS Lambda. The number of dependencies googleapis requires is HUGE.

I was forced to back away from the library and write my own bare-bones module that uses the REST interface. In my case, however, I'm operating as a "Web Application", which means I've secured both readonly access to the user's analytics account but also the access_type 'offline'. With this, I need to go through verifying and possibly refreshing an access token before using it.

If you have a user using your app in real-time, you'll unlikely need to take this approach and my code wouldn't be helpful. That having been said, I'm planning to package it up, as it would've really helped me to have a Promisified REST library for the Google Analytics API.
Reply all
Reply to author
Forward
0 new messages