Skip to content

Commit 6472b70

Browse files
author
Eric Koleda
committed
Change the file names expected for developer credentials and stored tokens to better match the name of the downloaded file.
1 parent e2c7893 commit 6472b70

14 files changed

Lines changed: 27 additions & 26 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ client_secret.json
33
application_credentials.json
44
storage.json
55
credentials.json
6+
token.json
67

78
.DS_Store
89

admin_sdk/directory/quickstart.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@
2424

2525
# Setup the Admin SDK Directory API
2626
SCOPES = 'https://www.googleapis.com/auth/admin.directory.user'
27-
store = file.Storage('credentials.json')
27+
store = file.Storage('token.json')
2828
creds = store.get()
2929
if not creds or creds.invalid:
30-
flow = client.flow_from_clientsecrets('client_secret.json', SCOPES)
30+
flow = client.flow_from_clientsecrets('credentials.json', SCOPES)
3131
creds = tools.run_flow(flow, store)
3232
service = build('admin', 'directory_v1', http=creds.authorize(Http()))
3333

admin_sdk/reports/quickstart.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,10 @@
3030

3131
# Setup the Admin SDK Reports API
3232
SCOPES = 'https://www.googleapis.com/auth/admin.reports.audit.readonly'
33-
store = file.Storage('credentials.json')
33+
store = file.Storage('token.json')
3434
creds = store.get()
3535
if not creds or creds.invalid:
36-
flow = client.flow_from_clientsecrets('client_secret.json', SCOPES)
36+
flow = client.flow_from_clientsecrets('credentials.json', SCOPES)
3737
creds = tools.run_flow(flow, store)
3838
service = build('admin', 'reports_v1', http=creds.authorize(Http()))
3939

admin_sdk/reseller/quickstart.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,10 @@
3030

3131
# Setup the Admin SDK Reports API
3232
SCOPES = 'https://www.googleapis.com/auth/admin.reports.audit.readonly'
33-
store = file.Storage('credentials.json')
33+
store = file.Storage('token.json')
3434
creds = store.get()
3535
if not creds or creds.invalid:
36-
flow = client.flow_from_clientsecrets('client_secret.json', SCOPES)
36+
flow = client.flow_from_clientsecrets('credentials.json', SCOPES)
3737
creds = tools.run_flow(flow, store)
3838
service = build('admin', 'reports_v1', http=creds.authorize(Http()))
3939

apps_script/quickstart/quickstart.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@
2525

2626
# Setup the Apps Script API
2727
SCOPES = 'https://www.googleapis.com/auth/script.projects'
28-
store = file.Storage('credentials.json')
28+
store = file.Storage('token.json')
2929
creds = store.get()
3030
if not creds or creds.invalid:
31-
flow = client.flow_from_clientsecrets('client_secret.json', SCOPES)
31+
flow = client.flow_from_clientsecrets('credentials.json', SCOPES)
3232
creds = tools.run_flow(flow, store)
3333
service = build('script', 'v1', http=creds.authorize(Http()))
3434

calendar/quickstart/quickstart.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@
2525

2626
# Setup the Calendar API
2727
SCOPES = 'https://www.googleapis.com/auth/calendar.readonly'
28-
store = file.Storage('credentials.json')
28+
store = file.Storage('token.json')
2929
creds = store.get()
3030
if not creds or creds.invalid:
31-
flow = client.flow_from_clientsecrets('client_secret.json', SCOPES)
31+
flow = client.flow_from_clientsecrets('credentials.json', SCOPES)
3232
creds = tools.run_flow(flow, store)
3333
service = build('calendar', 'v3', http=creds.authorize(Http()))
3434

classroom/quickstart/quickstart.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@
2626

2727
# Setup the Classroom API
2828
SCOPES = 'https://www.googleapis.com/auth/classroom.courses.readonly'
29-
store = file.Storage('credentials.json')
29+
store = file.Storage('token.json')
3030
creds = store.get()
3131
if not creds or creds.invalid:
32-
flow = client.flow_from_clientsecrets('client_secret.json', SCOPES)
32+
flow = client.flow_from_clientsecrets('credentials.json', SCOPES)
3333
creds = tools.run_flow(flow, store)
3434
service = build('classroom', 'v1', http=creds.authorize(Http()))
3535

drive/quickstart/quickstart.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@
2626

2727
# Setup the Drive v3 API
2828
SCOPES = 'https://www.googleapis.com/auth/drive.metadata.readonly'
29-
store = file.Storage('credentials.json')
29+
store = file.Storage('token.json')
3030
creds = store.get()
3131
if not creds or creds.invalid:
32-
flow = client.flow_from_clientsecrets('client_secret.json', SCOPES)
32+
flow = client.flow_from_clientsecrets('credentials.json', SCOPES)
3333
creds = tools.run_flow(flow, store)
3434
service = build('drive', 'v3', http=creds.authorize(Http()))
3535

gmail/quickstart/quickstart.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@
2525

2626
# Setup the Gmail API
2727
SCOPES = 'https://www.googleapis.com/auth/gmail.readonly'
28-
store = file.Storage('credentials.json')
28+
store = file.Storage('token.json')
2929
creds = store.get()
3030
if not creds or creds.invalid:
31-
flow = client.flow_from_clientsecrets('client_secret.json', SCOPES)
31+
flow = client.flow_from_clientsecrets('credentials.json', SCOPES)
3232
creds = tools.run_flow(flow, store)
3333
service = build('gmail', 'v1', http=creds.authorize(Http()))
3434

people/quickstart/quickstart.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@
2323

2424
# Setup the People API
2525
SCOPES = 'https://www.googleapis.com/auth/contacts.readonly'
26-
store = file.Storage('credentials.json')
26+
store = file.Storage('token.json')
2727
creds = store.get()
2828
if not creds or creds.invalid:
29-
flow = client.flow_from_clientsecrets('client_secret.json', SCOPES)
29+
flow = client.flow_from_clientsecrets('credentials.json', SCOPES)
3030
creds = tools.run_flow(flow, store)
3131
service = build('people', 'v1', http=creds.authorize(Http()))
3232

0 commit comments

Comments
 (0)