Google Oauth V3 Login CLI
Install npm i google-oauth-cli
A simple cli tool to create access tokens for google oauth v3.
Based on code from: https://developers.google.com/youtube/v3/quickstart/nodejs
Usage:
google-oauth-cli --client_secret=/path/to/client-secret --token_path=/path/to/save/token --token_file="token-file-name" --scopes=https://www.googleapis.com/auth/youtube
Parameter | Info |
--client_secret |
CompulsoryGoogle requires you get a client secret from your google developer console. Pass in the path (relative or absolute) to the file |
--scope |
CompulsoryGoogle requires you specify the scope you want to access via the token. You can create as many token as possible for a scope |
--token_path |
OptionalDefault:"/etc/google-credentials/"You can specify the path you want the token_file to be saved in so you can access it easily |
--token_file |
OptionalYou can specify the name of the file that holds the token. Note: You do not need to add the .json extension to the file name |