Reputation: 330
I have a sheet that has been shared with me. It has permissions set so that everyone in our company can read it.
I am trying to use Python to read info from this sheet, but am getting PERMISSION_DENIED. Using the same credentials file I can access any other sheets in my Drive, but not this one I have had shared with me - even if I add it to my drive.
What am I missing here?
The code I am using is from Google's own quickstart with the ID, range and print lines modified. I do not need to go much further than that.
When I test it with Google's own example it works fine.
Upvotes: 0
Views: 1412
Reputation: 2587
If you are using a json file as credentials and the json was created as a Service Account
, open that json and retrieve the client_email
inside it.
Now make sure that the owner has shared the spreadsheet you are trying to read with that email (usually it ends with .gserviceaccount.com
)
Upvotes: 1