1
votes

I am trying to access some data from a Google Sheet using the V4 Spreadsheets API and am getting a 403 with PERMISSION_DENIED. I have verified that the API has been enabled and am passing key={MY_KEY} in the URL. I set the sharing settings to "Anyone with a link" in my personal Google account which is working fine and I am getting data back using the following URL:

https://sheets.googleapis.com/v4/spreadsheets/MY_KEY/values/Sheet1?key=MY_KEY

However, at work we use GSuite and Link Sharing is restricted to our organization only so when I hit that URL for a Sheet in my work account with the same setup from my personal account (excluding the sharing settings), I get the 403 with PERMISSION_DENIED.

I don't see any documentation as to how to authorize outside of an organization or if its possible to add an exemption to be able to share outside of the organization.

1
Have you tried Sharing the sheet file to your email (with read, write or edit permissions)and then actually doing operations on it?noogui

1 Answers

2
votes

It is not possible to have an exemption from the sharing settings. If the policy prohibits sharing outside the organization, then the credentials accessing the sheet must be from a user in the organization.