NAME

yt-oauth - A simple script for retrieving access and refresh tokens

VERSION

Version 0.03

SYNOPSIS

yt-oauth --client-id=ID --client-secret=SECRET [--refresh-token=TOKEN]

    -i, --client-id      set the client ID
    -s, --client-secret  set the client secret
    -r, --refresh-token  get a fresh access token using TOKEN

DESCRIPTION

Authenticate with Google APIs using OAuth2. Retrieves an access token and a refresh token. Access token can be used to authorize API requests, and furthermore provides access to user data. Access tokens will expire, so a new one can be requested using the refresh token (--refresh-token).

Client ID and client secret are mandatory, and may be provided on the command line or by environment variable. A client ID and secret can be obtained from Google's API Console.

OPTIONS

-i id, --client-id=id
-s secret, --client-secret=secret
-t token, --refresh-token=token

Obtain an access token using the provided refresh token instead of asking the user to authorize. Refresh tokens may be stored and reused until they are revoked by the user, while access tokens expire after a short amount of time.

AUTHOR

Aaron L. Zeng <me@bcc32.com>