- API & Docs
Twilio Messaging allows you to:
You can also send SMS and MMS messages using Twilio's REST API. To send a message, make an HTTP POST to Twilio with the body of the message and the phone number you want to send it to. Messages must be sent from Twilio message-enabled phone numbers due to the architecture of the global SMS/MMS network.
When you buy a message-enabled Twilio phone number, you can associate that phone number with an Message URL. When someone sends a text message to that phone number, Twilio makes an HTTP request to your URL with the body of the message and the sender's phone number. You can then respond to the message by returning a reply message in the HTTP response to Twilio.
Using standard HTTP cookies, you can share state across multiple messages allowing you to treat separate messages between any pair of phone numbers as a conversation, and store data about the conversation in the cookie for future reference.
You can also use the TwiML <Sms> verb inside your existing Twilio voice calls to send a message during a phone conversation.
For specific details on what you can and can't accomplish using Twilio Message please refer to the Message FAQ
With that out of the way, let's go on to the next step.
This tutorial assumes you can run Flask on a server available over the Internet, and that you have the twilio-python library installed. If not, see our guide to setting up your local development environment.