Skip to content

Instantly share code, notes, and snippets.

View pcf000's full-sized avatar

Paul C Fuqua pcf000

View GitHub Profile
#!/usr/local/bin/python3
# This script is a refinement of what oauth2token provides, specific to
# my work situation. Normally, one could start with oauth2create and then
# use oauth2get indefinitely, with the latter getting a token either
# directly or after using the refresh token. However, my workplace has
# it set up to not have a refresh token, so I have this script try "get"
# and call "create" automatically if it fails.
#
# Start with "pip install oauth2token".