I would like to access some google APIs (cloud storage, for example) using a service account. Therefore I download a json file from google, looking like this:
{
"type": "service_account",
"project_id": "foo",
"private_key_id": "1234345234",
"private_key": "-----BEGIN PRIVATE KEY-----.......",
"client_email": "foo@priject.iam.gserviceaccount.com",
"client_id": "38573098473985",
"auth_uri": "https://accounts.google.com/o/oauth2/auth",
"token_uri": "https://oauth2.googleapis.com/token",
"auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
"client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/....."
}
According to https://cloud.google.com/docs/authentication/getting-started, this file (and most specifically the private key) can be used to access the API.
But I cannot figure out, if WebService::GoogleAPI::Client supports this. goauth seems to only work for user OAuth2 logins.
I might have some time to add this to WebService::GoogleAPI::Client, but before I dig I wanted to know if I maybe just missed the correct way to use a Service Account, and if you would consider a patch implementing this.
Greetings,
domm
I would like to access some google APIs (cloud storage, for example) using a service account. Therefore I download a json file from google, looking like this:
According to https://cloud.google.com/docs/authentication/getting-started, this file (and most specifically the private key) can be used to access the API.
But I cannot figure out, if WebService::GoogleAPI::Client supports this.
goauthseems to only work for user OAuth2 logins.I might have some time to add this to WebService::GoogleAPI::Client, but before I dig I wanted to know if I maybe just missed the correct way to use a Service Account, and if you would consider a patch implementing this.
Greetings,
domm