tsukasagenesis
tsukasagenesis

Reputation: 171

google drive api: delete is now impossible by api

https://developers.google.com/drive/api/v3/reference/files/delete seems broken now :

{
 "error": {
  "errors": [
   {
    "domain": "global",
    "reason": "forbidden",
    "message": "Insufficient permissions for this file",
    "locationType": "other",
    "location": "file.permissions"
   }
  ],
  "code": 403,
  "message": "Insufficient permissions for this file"
 }
}

if you copy a file from another account, it's impossible to delete it by API. I try it directly on the api page and it fail.

Could you check it out ?

Best regards.

Upvotes: 1

Views: 295

Answers (1)

Linda Lawton - DaImTo
Linda Lawton - DaImTo

Reputation: 117281

Insufficient permissions for this file

If the file was shared with you by someone else. This other person is the owner of the file. YOu cant delete a file owned by someone else. You can remove your permissions for the file there by removing your access to it.

If you want the file deleted they you need to have the user who owns the file delete it.

Upvotes: 1

Related Questions