You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's possible to build a service using GoogleCredentials? I tried giving the GoogleCredentials as parameter, but it crashes when building the service: service = build('bigquery', 'v2', http=http, discoveryServiceUrl=service_url)
I'm doing something like this: get_client(project, credentials=GoogleCredentials.get_application_default(), private_key="private_key.json", readonly=False)
But I got:
oauth2client.client.AccessTokenRefreshError: invalid_scope: Empty or missing scope not allowed.
I just don't know if I'm doing something wrong or if I don't know how to use the lib/services correctly.. but I believe I need something like this discovery.build('bigquery', 'v2', credentials=credentials)
Looking closer at your example, if you're providing a private key file, you should use the private_key_file kwarg, not private_key which takes the key as a string. Also, if you're providing credentials, you shouldn't have to provide a private key.
Activity
tylertreat commentedon Apr 18, 2016
This should work. Perhaps you need to do something like this?
Looking closer at your example, if you're providing a private key file, you should use the
private_key_filekwarg, notprivate_keywhich takes the key as a string. Also, if you're providing credentials, you shouldn't have to provide a private key.