How do I use a gcloud auth print-access-token token with R bigrquery

65 Views Asked by At

I've logged into GCP from my terminal and browser. I've run

gcloud auth print-access-token

And received a token in return. With python I do the following:

t = 'my token'
p = 'my project'
credentials = google.oauth2.credentials.Credentials(token=t)
client = bigquery.Client(project=p, credentials=credentials)

How do I use this with R and bigrquery?

"How to get your own API credentials" from get-api-credentials seems focused on getting some sort of permanent login solution sitting in a file. That's not acceptable, I need a "I've just logged in and validated myself with GCP, now I want to do something" solution, that can be run from a Vertex AI notebook in the Cloud

0

There are 0 best solutions below