From 6ee5482022b656fd6d02b5fc26bab280e88923c0 Mon Sep 17 00:00:00 2001 From: Jerjou Cheng Date: Thu, 13 Aug 2015 15:57:51 -0700 Subject: [PATCH] Make authn sample more uniform with the java one. --- bigquery/samples/utils.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bigquery/samples/utils.py b/bigquery/samples/utils.py index 53d26d0c6471..1916175a9b1c 100644 --- a/bigquery/samples/utils.py +++ b/bigquery/samples/utils.py @@ -21,9 +21,9 @@ def get_service(): from oauth2client.client import GoogleCredentials credentials = GoogleCredentials.get_application_default() - if credentials.create_scoped_required(): - credentials = credentials.create_scoped( - 'https://www.googleapis.com/auth/bigquery') + + # The build() method takes care of injecting the proper scopes + # for the given service, when using application default credentials. return build('bigquery', 'v2', credentials=credentials) # [END get_service]