$ pip install twilio
This includes an SID and token. You’ll need these for the program. You’ll also have to install the Twilio package using pip.
Then you simply call the API in your program, replacing all of the pertinent data in brackets:
from twilio.rest import Client
# Your Account Sid and Auth Token from twilio.com/console
account_sid = '[SID]'
auth_token = '[TOKEN]'
client = Client(account_sid, auth_token)
call = client.calls.create(
call_friend("[NUMBER TO CALL]")
You’ll notice this calls a web-based XML file that contains the text of my call. It “says,” in a female voice, that your call is very important to us. It repeats this again and then plays a classic tune. I’m able to run this program multiple times to make multiple calls.
<Say voice="alice">Your call is very important to us. Please hold.</Say>
This call is being recorded for training purposes. Please hold.
<Say voice="alice">This call is very important to us. Please hold.</Say>
The process costs a few pennies per call and it seems the scamming team — which in this case consisted of two guys who cursed me out when I told them I was calling them — blocked the number for a few minutes. However, I saw multiple calls go through until they got their wits about them.