Are you ready to learn how to you use Twilio to meet your SMS and MMS marketing needs? With this Twilio Kickstart, you can get started as quickly as possible. Once your code is up-and-running, feel free to check out the SMS and MMS Marketing Notifications with Python and Flask tutorial.
- A recent version of Mac OS. We are working on adding Windows and Linux functionality to Kickstarts. Stay tuned!
- Python 3.6 or higher (we use some new features like types and formatted string literals so older versions won't work.) Check out this tutorial for help!
- A phone number in your Twilio account. To get your first Twilio phone number, head on over to the console and find a number that meets your needs with SMS capabilities.
Once you've downloaded your .zip file, you can uncompress in whatever directory you've downloaded it in:
After that, run the Makefile commands to install all dependencies and start the server. This Makefile will create a virtual environment for your Python 3 install and install everything in it (this also makes sure nothing is installed in your global libraries!) For this example below, let's assume your Twilio phone number is +14155551212:
make install number=14155551212
This Kickstart will install ngrok, which lets your personal computer be accessible on the internet via an autogenerated random URL. This lets Twilio reach your personal computer once a text message is received so your application can react via webhook.
Once your server starts, send a text saying "Hello" to the Twilio phone number. Follow it's instructions to opt-in to notifications.
Finally, use the locally running web interface to send notifications to all who have opted in.
- Make sure to check out the SMS and MMS Marketing Notifications with Python and Flask tutorial.
- Also, check out our best practices for How to set up your Python and Flask development environment.
Dive in deeper with the other Twilio Guides.