Created
November 2, 2014 21:05
-
-
Save alexford/545c59d69261f7ebb4ca to your computer and use it in GitHub Desktop.
A quick and dirty Ruby script to remove ALL call recordings from a Twilio account
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
require 'twilio-ruby' #twilio-ruby gem | |
account_sid = 'your account SID' | |
account_token = 'your account auth token' | |
@client = Twilio::REST::Client.new account_sid, account_token | |
recordings = @client.recordings.list | |
puts "Total recordings: #{recordings.total}" | |
recordings_remaining = recordings.total | |
while recordings_remaining > 0 do | |
@client.recordings.list.each do |rec| | |
rec.delete | |
print "." | |
end | |
recordings_remaining = @client.recordings.list.total | |
puts "#{recordings_remaining} recordings remaining" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment