Command line tool to retrieve oauth tokens for programmatic access to google services
npm install google-authgoogle-auth
===========
Command line tool to retrieve oauth tokens for programmatic access to google services.
npm install -g google-auth
* Go to https://console.developers.google.com
* If there is not a project there, create a new one
* Click on the projects name
* Navigate to API & Auth / Credentals
* Create new client with these options
!client
* Record the client secret and id
* Go to https://console.developers.google.com/project/86071142858/apiui/consent
* make sure the email and product name fields are filled in
```
$ google-auth --id=
If you do not pass in the id and secret parameters, the app will look for the environmentalGOOGLE_CLIENT_ID
variables , GOOGLE_CLIENT_SECRET
For example, to authenticate with google drive and google calendar:
`
$ export GOOGLE_CLIENT_ID=
$ export GOOGLE_CLIENT_SECRET=
$ google-auth drive calendar
``
this will open a web browser for you to confirm your authentication.