Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions gmailMessageCounter.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from apiclient.discovery import build
from oauth2client.client import flow_from_clientsecrets
from oauth2client.file import Storage
from oauth2client.tools import run
from oauth2client import tools

CLIENT_SECRET_FILE = 'client_secret_<YOUR-UNIQUE-ID-GOES-HERE>.apps.googleusercontent.com.json'
STORAGE = Storage('gmail.storage')
Expand All @@ -20,7 +20,7 @@ def build_service():
http = httplib2.Http()
credentials = STORAGE.get()
if credentials is None or credentials.invalid:
credentials = run(flow, STORAGE, http=http)
credentials = tools.run_flow(flow, STORAGE, http=http)
http = credentials.authorize(http)
return build('gmail', 'v1', http=http)

Expand Down