Wednesday, 26 April 2017

TypeError: Cannot read property 'client_secret' of undefined

I'm trying to follow Google's Node API to access gmail here.

When running their sample quickstart as node quickstart.js, I am given the following error:

TypeError: Cannot read property 'client_secret' of undefined
    at authorize (/home/user/example/quickstart.js:32:43)
    at processClientSecrets (/home/example/bstick/quickstart.js:21:3)
    at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:439:3)

  • I have downloaded the key and renamed it client_secret.json, and copied it to working directory of quickstart.js
  • node --version = 7.8.0, package.json has "google-auth-library": "^0.10.0", "googleapis": "^19.0.0"


via cbll

No comments:

Post a Comment