Sharing Google Sheet With Service Account Email
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
Solution 1:
I solved my issue:
Google has updated its service account detail format and also it's way of sharing Spreadsheets with service accounts so that they can be accessible from gspread.
I created then a service account with the new formating : dataload@geometric-shine-118101.iam.gserviceaccount.com and set the exact same file google generates as a JSON to be read by my application:
login = SignedJwtAssertionCredentials(json_key['client_email'], json_key['private_key'], scope)
then shared without notifications the spreadsheet with my service account email (the same in the JSON file I just mentioned)
Post a Comment for "Sharing Google Sheet With Service Account Email"