Skip to content

Instantly share code, notes, and snippets.

@caseysoftware
Created February 21, 2012 20:50
Show Gist options
  • Save caseysoftware/1878833 to your computer and use it in GitHub Desktop.
Save caseysoftware/1878833 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.
from datetime import date
from twilio.rest import TwilioRestClient
account = "ACxxxx"
token = "xxxxxx"
client = TwilioRestClient(account, token)
recordings = client.recordings.list(after=date(2012, 1, 1))
for recording in recordings:
print recording.sid
recording.delete()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment