Open lquerel opened 2 years ago
Loving your library! Thank you so much for working on it! Is there a way to authenticate using Bearer token somehow?
Unfortunately, I can't use service account keys for the project..
It should be fairly simple (just need to pass extra header -H "Authorization: Bearer [TOKEN]"
:
curl -X POST \
-H "Authorization: Bearer [TOKEN]" \
-H "Content-Type: application/json" \
--data '{
"query": "SELECT 42"
}' \
"https://bigquery.googleapis.com/bigquery/v2/projects/[PROJECT_ID]/queries"
Where the token could be generated with e.g. $ gcloud auth application-default print-access-token
.
At the moment even without rotating tokens works well for me, etc.
Is there a way of doing it somehow? Thank you!
See https://github.com/lquerel/gcp-bigquery-client/discussions/21 for more details.