This deletes all slack files that are greater than 30 days old and that have a download url with them.
All that is needed is to add a correct token that you can get from here ( https://api.slack.com/docs/oauth-test-tokens )
Make sure that the download feature works first by making the parameter with delete to false just to make sure slack didnt alter anything with downloading.