Skip to content

Instantly share code, notes, and snippets.

View burnash's full-sized avatar
💭
I may be slow to respond.

Anton Burnashev burnash

💭
I may be slow to respond.
View GitHub Profile
@burnash
burnash / get_oauth2_token.py
Last active August 11, 2021 21:16
Simple command line script to fetch a Google API's access token.
'''
This script will attempt to open your webbrowser,
perform OAuth 2 authentication and print your access token.
It depends on two libraries: oauth2client and gflags.
To install dependencies from PyPI:
$ pip install python-gflags oauth2client