Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Dropbox API - permanently delete files

Is it possible to delete a file from Dropbox using Dropbox API? I am currently delete files this way: https://www.dropbox.com/developers/core/docs#fileops-delete. However, this doesn't permanently delete files, they are just moved to trash.

like image 419
noname Avatar asked Dec 18 '25 14:12

noname


2 Answers

You should use : /fileops/permanently_delete - Permanently deletes a file or folder.

 OAuthUtility.PostAsync  
(
"https://api.dropboxapi.com/1/fileops/permanently_delete",
  new HttpParameterCollection
   {
      {"access_token",Properties.Settings.Default.AccessToken      },
       {"root", "auto"},
        {"path", path }).Replace("\\", "/") }
    },

);

This endpoint is only available to Dropbox for Business apps using the X-Dropbox-Perform-As-Team-Member header.

RETURNS An empty JSON dictionary.

like image 60
Deepak Pote Avatar answered Dec 21 '25 03:12

Deepak Pote


The API doesn't expose a way to permanently delete files. (Nor does the desktop or mobile apps, for that matter. The web UI is the only way to do that.)

like image 39
user94559 Avatar answered Dec 21 '25 04:12

user94559