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
{{ message }}
This repository was archived by the owner on Mar 6, 2026. It is now read-only.
Confirm application default credentials are an authorized user (env var GOOGLE_APPLICATION_CREDENTIALS is not set, and gcloud auth application-default login has been run and quota project has been added to ADC)
Run the code from the guide "Querying Drive Data"
from google.cloud import bigquery
import google.auth
# Create credentials with Drive & BigQuery API scopes.
# Both APIs must be enabled for your project before running this code.
credentials, project = google.auth.default(
scopes=[
"https://www.googleapis.com/auth/drive",
"https://www.googleapis.com/auth/bigquery",
]
)
# Construct a BigQuery client object.
client = bigquery.Client(credentials=credentials, project=project)
Inspect the credentials and client variables. Neither will contain the drive scope provided.
OR
Attempt to run a query that references a drive-sourced table and receive the error: google.api_core.exceptions.Forbidden: 403 Access Denied: BigQuery BigQuery: Permission denied while getting Drive credentials.
The user I am authenticating as has viewer permissions for the sheet in question.