ads-token-gen
An NPM module for generating OAuth2 credentails for Google Adword API
client_d
and client_secret
How to get - Follow the instructions here
Installation
$ npm install -g ads-token-gen
Or you can install as a dev-dependency and use npx
instead.
Usage
Start by generating the Authentication URL by running:
$ export AW_CLIENT_ID=client_id$ export AW_CLIENT_SECRET=client_secret
$ ads-token-gen --url
NOTE: You can also change the scope from the default one (Adwords) by supplying
--scope <scope-url>
The auth url
will be generated and copied to the clipboard. Paste it on your browser.
Follow the authorization directions and copy the code generated (at the final stage). Use the code obtained in the command below:
$ ads-token-gen --code <code>