-
-
Save po5i/c66b4fea92dd2f02780a035e1a132e45 to your computer and use it in GitHub Desktop.
This is a simple script using the Twilio Python module to retrieve Recordings within a certain date range and then delete them.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from datetime import date | |
from twilio.rest import Client | |
account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" | |
auth_token = "your_auth_token" | |
client = Client(account_sid, auth_token) | |
recordings = client.recordings.list(date_created_after=date(2012, 1, 1)) | |
for recording in recordings: | |
print("Deleting: " + recording.sid) | |
recording.delete() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment