2
votes

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.

2

2 Answers

5
votes

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.

4
votes

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.)