https://linen.dev logo
How to connect to BigQuery using service accounts?
# 🖥│support-forum
j
I am trying to connect to my BigQuery account using a service account JSON key: { "type": "service_account", "project_id": "...", "private_key_id": "...", "private_key": "... ... } But when I paste my JSON credentials I get the error: Request failed with status 401: {"error":"invalid_request","error_description":"Invalid Credentials"} Have anyone successfully connect to BigQuery with service accounts? I have tested the key myself using python and it works well.
u
Hey @Javier Pozueco, we were able to reproduce the issue, to unblock yourself, could you try using OAuth2 auth mode and lmk if it works for you?
j
yes, I was able to authenticate with OAuth2 but it's easier for me to use service accounts based on my GCP organization policies, so I wonder if service accounts are a possibility.
u
We are in the middle of refactoring the toolkit, and we might remove the support for
GOOGLE_SERVICE_ACCOUNT
auth mode. I'd recommend using
OAuth2
. You can keep an eye on our [changelog](https://docs.composio.dev/docs/changelog) for any changes. Thanks for understanding : )
j
Thank you!