Overview
- I am creating a folder and spreadsheets using API I can access all files inside that folder using google spreadsheet API
- (problem) But then I upload the file from the front, Now this file can not be accessed via spreadsheet API, I have given full permission(owner) to the user.
So basically the problem is that I want to let other user drop spreadsheets in my shared drive and want to access these files via python API
error message "This operation is not supported for this document"
JSON RESPONSE
{ "error": { "code": 403, "message": "The request is missing a valid API key.", "status": "PERMISSION_DENIED" } }
Background:
I am using python to create folders and sheets, and I wanted to share the folder for other users to update the spreadsheet files so I gave permissions to other users, but when they dropped the files in the drive I can access the file metadata but not the contents of the spreadsheets
Relevant Code:
`SCOPES = ['https://www.googleapis.com/auth/drive.appdata','https://www.googleapis.com/auth/spreadsheets', 'https://www.googleapis.com/auth/drive']
sheet_service = build('sheets', 'v4', credentials=get_Service())
drive_service = build('drive', 'v3',credentials=get_Service())
def get_values(self,SAMPLE_SPREADSHEET_ID, SAMPLE_RANGE_NAME):
sheet = sheet_service.spreadsheets()
result = sheet.values().get(spreadsheetId=SAMPLE_SPREADSHEET_ID,
range=SAMPLE_RANGE_NAME).execute()`
Expected help > bypass these permission restrictions
I have noticed something when I drop the file the sheet id is different from when I create it with API or from google drive