This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""Fetching the latest GMail email using OAuth 2 and IMAP. | |
Requires requests-oauthlib, which is available on pypi. | |
Includes a basic SASL XOAUTH2 authentication method for imaplib. | |
""" | |
# Credentials you get from registering a new web application in Google API Console | |
client_id = 'your-id.apps.googleusercontent.com' | |
client_secret = 'your secret' | |
redirect_uri = 'your callback uri' |