I wrote a script to connect to a Google spreadsheet and load data into a postgresql database from it. I already created a service account and obtained the necessary credentials for it in a .json format,the problem is when I try to share the google sheet with my service account email, I receive an email saying:
Delivery to the following recipient failed permanently:
dataload@geometric-shine-118101.iam.gserviceaccount.com
Technical details of permanent failure: DNS Error: Address resolution of geometric-shine-118101.iam.gserviceaccount.com. failed: Domain name not found
that email is the exact same one I get in my .json key file. I have checked in other posts and generally the structure of the email that should be shared is something like this:
project_name@developer.gserviceaccount.com
but mine is different, perhaps it has something to do with this? I followed the instructions on this link.
This is a copy of the .json key file:
{
"type": "service_account",
"project_id": "geometric-shine-118101",
"private_key_id": "xxx",
"private_key": "-----BEGIN PRIVATE KEY-----\nxxx\n-----END PRIVATE KEY-----\n",
"client_email": "dataload@geometric-shine-118101.iam.gserviceaccount.com",
"client_id": "117076930343404252458",
"auth_uri": "https://accounts.google.com/o/oauth2/auth",
"token_uri": "https://accounts.google.com/o/oauth2/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/dataload%40geometric-shine-118101.iam.gserviceaccount.com"
}