1var google = require('googleapis').google;
2var OAuth2 = google.auth.OAuth2;
3var oauth2Client = new OAuth2();
4oauth2Client.setCredentials({access_token: 'ACCESS TOKEN HERE'});
5var oauth2 = google.oauth2({
6 auth: oauth2Client,
7 version: 'v2'
8});
9oauth2.userinfo.get(
10 function(err, res) {
11 if (err) {
12 console.log(err);
13 } else {
14 console.log(res);
15 }
16});
17