oauthclient.OAuth2Credentials does not implement create_scoped or create_scoped_required
See original GitHub issueRight now, the gcloud-python API only authorize through service account. Can we add the user authorization using client_secret.json file?
https://developers.google.com/identity/protocols/OAuth2WebServer
from oauth2client import client
from oauth2client.file import Storage
from oauth2client import tools
FLOW = flow_from_clientsecrets('client_secret.json',
scope='https://www.googleapis.com/auth/bigquery')
storage = Storage('bigquery_credentials.dat')
credentials = storage.get()
if credentials is None or credentials.invalid:
credentials = run(FLOW, storage)
http = httplib2.Http()
http = credentials.authorize(http)
Issue Analytics
- State:
- Created 8 years ago
- Comments:7 (6 by maintainers)
Top Results From Across the Web
Class ComputeEngineCredentials (1.7.0) | Java client library
OAuth2 credentials representing the built-in service account for a Google Compute Engine VM. Fetches access tokens from the Google Compute ...
Read more >GoogleCredential.createScopedRequired - Java - Tabnine
Indicates whether the credential requires scopes to be specified by calling createScoped before use. Popular methods of GoogleCredential. createScoped. Beta For ...
Read more >google-auth-library - npm
The basics of Google's OAuth2 implementation is explained on Google Authorization and Authentication documentation.
Read more >Using OAuth 2.0 with the Google API Client Library for Java
Alternatively, if you are not using GoogleAuthorizationCodeFlow, you may use the lower-level classes: Use DataStore.get(String) to load the ...
Read more >GoogleCredentials (Google Auth Library for Java - javadoc.io
boolean, createScopedRequired(). Indicates whether the credentials require scopes to be specified via a call to createScoped(java.util.Collection<java.lang.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Hi @dhermes,
This one works perfectly:
However, I try this for the user authentication with client_secret.json, and bigquery_credentials.dat, but this one give me error:
Error message:
How can I tune this to make the gcloud/connection.py works?
BTW, I cannot re-open this issue.
Thanks, Tuan
“Know” might be strong but AFAIK the only other things we use a credential for are getting access tokens for signing requests and providing a way to generate a signed URL (and neither
GoogleCredentialsnorOAuth2Credentialscan do this since they don’t have a key to sign with).