Forum Discussion

JamoSmoove's avatar
JamoSmoove
New member | Level 2
5 years ago

Automate the cleanup of Dropbox "Deleted files"

Our company has had an old SKU that didn't provide for automated cleanup of the "Deleted files" on all account holders.  This means that some of our users have as many as 30,000 files sitting in their Deleted files section of Dropbox over the past 5+ years. 

 

I am wondering if anyone has had success scripting the permanent deletion of all files/folders in the Deleted files for all users in a Dropbox for Business account? 

1 Reply

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Community Moderator rankDropbox Community Moderator
    5 years ago

    Dropbox does offer the ability to programmatically permanently delete files, via the /2/files/permanently_delete endpoint. (That's a link to the documentation for the HTTPS endpoints themselves, but we recommend using one of the official SDKs if possible. Those have corresponding native methods for the HTTPS endpoints.)

     

    That endpoint in particular is only available to team-linked apps. You'd need to connect the app to your team and use the "member file access" feature to call it on behalf of any particular team member.

     

    You may also want to check out the File Access Guide for information on interacting with the Dropbox filesystem via the API in general.

About Discuss Dropbox Developer & API

Node avatar for Discuss Dropbox Developer & API
Make connections with other developers

The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.

If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X, Facebook or Instagram.

For more info on available support options for your Dropbox plan, see this article.

If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!