Skip to content

Instantly share code, notes, and snippets.

@vijaythakkar
vijaythakkar / googleAuthTest.py
Created April 3, 2017 13:50
Example python script for REST based OAuth2 for Google Services
#!/usr/bin/env python
import requests
import json
import webbrowser
import urllib
# Goole app setup with "Other" category of credentials, set client id and secret here
# Example methods are in order:
# get_code() spawn a browser and ask for the user to login