Skip to content

Instantly share code, notes, and snippets.

@thunderInfy
Created May 23, 2021 03:41
Show Gist options
  • Select an option

  • Save thunderInfy/b10a22b107d1205b6ad733bbbaf1c0a5 to your computer and use it in GitHub Desktop.

Select an option

Save thunderInfy/b10a22b107d1205b6ad733bbbaf1c0a5 to your computer and use it in GitHub Desktop.
from twilio.rest import TwilioRestClient
def dial():
TWILIO_PHONE_NUMBER = "<your twilio trial number>"
number = "<your number that you have already verified>"
TWIML_INSTRUCTIONS_URL ="https://gist.githubusercontent.com/thunderInfy/5fffbe366e990a2b057b872cfa49db73/raw/c8edb2b4ef044fb3806e3bb5ec459e08c1cecac1/twiml.xml"
client = TwilioRestClient(<Account SID>, <AUTH TOKEN>)
client.calls.create(to=number, from_=TWILIO_PHONE_NUMBER, url=TWIML_INSTRUCTIONS_URL, method="GET")
if __name__ == "__main__":
dial()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment