Programmable Messaging Tutorials
Looking for a Programmable SMS tutorial? We have two flavors: those with a complete working sample application and those without.
Basic Tutorials
- How to send SMS and MMS messages
- How to track delivery status of messages
- How to retrieve and modify message history
- How to receive and reply to SMS messages
- How to create an SMS conversation
Tutorials with Full Working Sample Apps
Automated Survey
Using Twilio you can build automated surveys that call your customer at the point of service to get immediate feedback. Companies like Survey Monkey are using automated surveys to create better customer experiences. "No one else can offer a poll at 6:00pm and get results by 6:30pm," says Chuck Groom, head of engineering at Survey Monkey's Seattle office. "And what takes the best vendors 3 to 5 days we can accomplish in just two hours."
Follow along with this simple tutorial to see the code necessary to implement automated surveys that integrate directly with your CRM and customer database.
- C# (ASP.NET MVC)
- Java (Servlets)
- Java (Spark)
- Java (Spring)
- Node.js (Express)
- PHP (Laravel)
- Python (Django)
- Python (Flask)
- Ruby (Rails)
- Ruby (Sinatra)
Account Phone Verification with Twilio Verify
When a new user signs up for your application, you want to make sure their contact information is accurate. You'd also like some assurance they are in fact a human being! You want to make sure that every new user account in your system is an actual person you can serve.
There are many layers of security you can put in place to increase the quality of your signups, but one of the best is phone verification via the user's device. Before a registration is fully completed, your application sends the user a one-time passcode via SMS or Voice. The user then enters the code on your website to complete their registration.
In this tutorial, you'll learn how to implement account verification at the point of registration using Twilio Verify.
Two-Factor Authentication with Authy
Two Factor Authentication (2FA) helps keep your user accounts secure by validating two "factors" of identity. Most login systems only validate something your user knows, like a password. You can make it harder for evildoers to compromise a user account by also validating something a user has, like a mobile phone.
In this tutorial, we will show you how to validate both of these factors in a simple token-based login system. To make everything a bit simpler, we'll also be using Twilio-powered Authy. Authy helps handle all the moving parts associated with 2FA, including sending one-time passwords via text message to your users.
- C# / .NET
- Java / Servlets
- Java / Spring
- Node.js / Express
- PHP / Laravel
- Python / Flask
- Python / Django
- Ruby / Rails
Appointment Reminders
Appointment reminders allow you to automate the process of reaching out to your customers in advance of an upcoming appointment. Twilio customers like Handy and Arkansas Children's Hospital use appointment reminders to reduce no-shows and ensure customers have everything they need in advance of an appointment. Whether you're a dentist, doctor, cable company, or car repair shop, you can use automated appointment reminders to save time and money.
In this tutorial, you'll learn how to implement appointment reminders at the moment the appointment is created.
- C# (ASP.NET MVC)
- Java (Spark)
- Node.js (Express)
- PHP (Laravel)
- Python (Django)
- Python (Flask)
- Ruby (Rails)
Employee Directory
Use Twilio to accept SMS messages and turn them into queries against a database. This example functions as an Employee Directory where a mobile phone user can send a text message with a partial string of a person's name and it will return their picture and contact information (e-mail address and phone number).
- C# (ASP.NET MVC)
- Java (Servlets)
- Node.js (Express)
- PHP (Laravel)
- Python (Flask)
- Ruby (Rails)
- Ruby (Sinatra)
ETA Notifications
Companies like Uber, TaskRabbit, and Instacart use ETA Notifications to keep their customers up to date on the status of their order or request. More and more services are relying on SMS as the primary way of communicating with their customers for on-demand purchases.
In this tutorial, we'll build a notification system for Laundr.io, a fictional on-demand laundry service.
Instant Lead Alerts
Instant lead alerts allow salespeople to close more deals by talking to interested customers moments after they are identified. In this tutorial, you will learn how to implement real-time lead alerts via SMS text messages.
Twilio customers like Trulia and ShowingTime use lead alerts in real estate, connecting agents to potential home buyers right after they register their interest in a property. Real estate not your game? Use these same techniques in your own application to notify any type of sales professional when a new lead has been received by your system.
SMS and MMS Marketing Notifications
With the amount of noise in social media and e-mail inboxes, it's hard to make a meaningful connection with your customers or audience. SMS text and/or MMS picture messages, however, are a personal communication channel with an open rate above 95%, which make them a great choice for social communication.
In this tutorial, you will learn how to enable your users to opt-in for an SMS marketing campaign using their mobile phone.
- C# (ASP.NET MVC)
- Java (Servlets)
- Node.js (Express)
- PHP (Laravel)
- Python (Flask)
- Ruby (Rails)
- Ruby (Sinatra)
Masked Phone Numbers
Allow your customers or mobile employees to call or text each other while masking their phone numbers. By implementing masked phone numbers you can track all conversation metadata in your system while maintaining your customers' privacy. Twilio customers like Uber & Airbnb use masked phone numbers to create a frictionless conversation.
In this tutorial, we'll learn how a company like Airbnb might implement masked phone numbers.
SMS and MMS Notifications
Text messages are a great channel for sending out time-sensitive alert messages. With higher open rates and more immediacy than e-mail, text messages help you reach your users quickly while avoiding their disastrous inboxes. Customers like Pager Duty use text messages as a part of their notification scheme to let IT administrators know quickly when their computers are on fire.
In this tutorial, we'll show you a simple web application which sends out alert messages to server administrators when an error condition occurs.
- C# (ASP.NET MVC)
- Java (Servlets)
- Java (Spark)
- Java (Spring)
- Node.js (Express)
- PHP (Laravel)
- Python (Django)
- Ruby (Rails)
- Ruby (Sinatra)
Workflow Automation
By using Twilio as a communication channel your company can reduce the cost of interacting with your customer. Twilio customers like Duke University have automated their workflows to increase engagement and reduce the difficulty for customers. By pairing SMS notifications with inbound SMS handling, your application can be updated from anywhere in the world, by anyone with a phone.
In this tutorial, we'll learn how a company like Airbnb might implement workflow automation to handle reservations.
Dynamic Call Center
Create a seamless customer service experience by assigning callers to specialized agents within your call center. With Twilio TaskRouter, you no longer have to handle the complicated task workflow features necessary to build a dynamic call center. Learn how in this tutorial.
Need some help?
We all do sometimes; code is hard. Get help now from our support team, or lean on the wisdom of the crowd by visiting Twilio's Stack Overflow Collective or browsing the Twilio tag on Stack Overflow.