Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 6ee5482

Browse files
author
Jerjou Cheng
committed
Make authn sample more uniform with the java one.
1 parent b453dc5 commit 6ee5482

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

bigquery/samples/utils.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ def get_service():
2121
from oauth2client.client import GoogleCredentials
2222

2323
credentials = GoogleCredentials.get_application_default()
24-
if credentials.create_scoped_required():
25-
credentials = credentials.create_scoped(
26-
'https://www.googleapis.com/auth/bigquery')
24+
25+
# The build() method takes care of injecting the proper scopes
26+
# for the given service, when using application default credentials.
2727
return build('bigquery', 'v2', credentials=credentials)
2828
# [END get_service]
2929

0 commit comments

Comments
 (0)