$ 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
def call_friend(number):
account_sid = '[SID]'
auth_token = '[TOKEN]'
client = Client(account_sid, auth_token)
call = client.calls.create(
url='https://johnbiggsbooks.com/ninjax.xml' ,
to=number,
from_='[YOUR NUMBER]'
)
print(call.sid)
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.
VIDEO
<Response>
<Say voice="alice">Your call is very important to us. Please hold.</Say>
<Say voice="alice">
This call is being recorded for training purposes. Please hold.
</Say>
<Say voice="alice">This call is very important to us. Please hold.</Say>
<Play>http://demo.twilio.com/docs/classic.mp3</Play>
</Response>
The result?
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.