Company
Date Published
Author
Peter Tan
Word count
1863
Language
English
Hacker News points
None

Summary

To delete bulk recordings from Twilio's Recordings API, you can use Python and its built-in libraries. First, set up your environment with Python 3.x, the Twilio helper library, and necessary environment variables. Then, create a script that lists all recordings created before a specified date, extracts their RecordingSID, and deletes them using the Twilio API. However, this approach has limitations, such as waiting for response times from Twilio, which can be time-consuming for large numbers of recordings. To overcome this, use multi-threading to delete recordings concurrently, creating a centralized queue and worker threads that drain it while writing results to a CSV file. Finally, you can modify the script to download recordings to cold storage on magnetic tape if needed.