Basically I have a program to do few things on a shared drive. There are around 15 people uploading audio files once a day simultaneously. The account associated with the program is the owner of the shared drive where they upload the files.
The problem occurs when I tell the program to execute the function drive.files().delete(fileId=id).execute()
to remove these audio files after downloading them but it raises Permissions Error
.\
I tried to upload my own files and then try to remove them with the function and it does so very well.
So my conclusion is that I have to be owner of the files to deleting them, but in the Google Drive API wiki it says that a owner account of the shared drive where the files are can delete them too, so I'm very confused. "Permanently deletes a file owned by the user without moving it to the trash. If the file belongs to a shared drive the user must be an organizer on the parent.." Link: https://developers.google.com/drive/api/v3/reference/files/delete?hl=en
I don't know what to try now