send bulk sms with twilio
Let’s face it: as we are becoming a mobile-first society, virtually everybody everywhere is familiar with text messaging. That’s why businesses are quickly adopting texting as an alternative – and more intimate – way to connect with customers. With the advent of Simple Message Service (SMS) Bulk Messaging, making these connections is even easier. Businesses can now cost-effectively and simultaneously send timely and straightforward messages to thousands (or even millions) of customers. And just because these texts are sent in bulk, they can still retain a surprising amount of personalization and urgency.
Ready to send your first bulk SMS message but not sure where to get started? Follow this step-by-step guide, and you’ll be sending high-volume text messages in no time.
1.Grow an audience
To start, you’ll need a contact list of recipients who have explicitly permitted you to message them. Start growing your SMS subscriber list by placing an opt-in form on your website or encouraging your prospects and customers to text a keyword (like “Join” or your company name) to a mobile number or short code. You can also send a double-opt-in message to confirm their subscription and ensure you only have interested users on your list.
2.Find an SMS service provider
Next, you’ll need to find an SMS service provider to help you send your bulk SMS message. With Twilio’s Programmable Messaging API, you can easily send SMS messages to every subscriber on your list. Not only can you send messages quickly and easily, but you can also get access to our robust library of documentation, sample code, and developer tools to help you build exactly what you want—fast. Plus, we’ll handle carrier and global regulations, so you can focus on reaching your customers and crafting the perfect bulk SMS message.
3.Get a short code
If you rely on long code (or a 10-digit phone number) to send more than a few hundred messages a day, your messages could end up in the spam folder. That can be a problem when trying to send bulk SMS messages.
Instead, short codes (or 5- or 6-digit numbers) are preapproved by carriers to have a high throughput and aren’t subject to carrier filtering, allowing you to send and receive bulk SMS/MMS messages more effectively. You can easily buy short codes from Twilio if your brand doesn’t have any or port existing numbers to the Twilio platform to get right to sending. Twilio also offers volume discounts for SMS and short code SMS messages if your monthly sends exceed 500,000 to 4.5 million messages so that your business reliably reaches your customers and at a reasonable price.
4.Craft your message
Once you’ve found a bulk SMS service provider and procured a short code, you’re almost ready to send. All that’s left is to choose which audience you’re sending to and draft your message. While this part sounds simple, don’t rush it. Every text blast you send should be meaningful and provide value to your subscribers, so they remain engaged and loyal to your brand. If you need some inspiration to get your bulk SMS message started, check out our text blast writing best practices in the next section.
Lastly, it’s time to send your message to the world. Using your email service provider of choice, you’ll need to set your recipient, sender, and content parameters. Your recipient list will be who you’re sending to, while your company’s long or short code will be your sender. As you may have guessed, your SMS content consists of the full text message or media content you want to include in your SMS/MMS message. Once you have all this information prepared, you’re ready to hit “Send,” sit back, and start tracking the message’s performance. To help, here’s a simple example for sending programmable SMS text or picture messages.
Prefer a step-by-step guide to sending your first message with Twilio? Check out our Programmable SMS quickstart guide in your preferred language: C#, Java, Node.js, PHP, Python, or Ruby.
The ultimate guide to sending bulk SMS with Twilio and Node.js
Sending a single SMS with Twilio is a relatively straightforward affair, but what if you had to send 10 messages? Or 10,000?
Imagine you’re an ice cream seller. You want to improve business by sending SMS alerts when you’re in your van so that your customers will know you’re on your way to deliver some sweet refreshment.
Look, I know what you’re thinking: “It’s December, hardly time for ice cream!” But, I’m in Melbourne right now enjoying a toasty 31°C Summer day so icy cold things are on my mind right now.
In this post we’ll look at how to work up from sending the first message to subscriber number 1 to up to 10,000 messages with Node.js.
To follow along with this post and code the same features you’re going to need a couple of things:
- Node.js and npm (I’m using the latest LTS version of Node.js, 8.9.1)
• A Twilio account and a Twilio number that can send SMS messages
Once you’ve got those bits sorted create a new directory to work with and initialise it with npm and install the modules we’ll need:
npm init -y
npm install twilio dotenv node-env-run –save
In this case I’m using dotenv to store the credentials that we need to interact with the API. For loading them even easier I’ve included Dominik’s node-env-run too. Let’s add those credentials now. Create a file called .env and enter the following, replacing the placeholders with your account credentials and Twilio number:
Got all that? Good, let’s send some messages!
The first scoop
It all starts with a single message to your first subscriber. This is your alpha test for your ice cream delivery alerts subscription. You only need to send one message, let’s write that code.
Create a file called firstscoop.js open it up and add the following:
const twilio = require(‘twilio’)(
const body = ‘Ice creams are coming!’;
This code imports the Twilio Node.js module and initialises a new API client using your Account Sid and Auth Token. We also setup the message that we are going to send.
We need a number to send the message to. This is the alpha test, so maybe just add your own number for now. Make sure your number here, and throughout this post, is in E.164 format.