Content Deep Dive
Send an SMS message During a Phone Call with Python and Flask
Blog post from Twilio
Post Details
Company
Date Published
Author
Kat King
Word Count
2,474
Language
English
Hacker News Points
-
Summary
This tutorial teaches developers how to use Twilio's Programmable Voice and SMS APIs to send a text message during a phone call using Flask and Python. The application accepts an incoming phone call, says something to the caller, and sends the caller an SMS with a super-secret password. To do this, developers need to sign up for a Twilio account, get a Twilio phone number, create a Flask app that receives the call, and use ngrok to expose the app's URL to Twilio. The application also includes error handling for cases where the recipient is unable to receive SMS messages, such as if they are calling from a landline.