How to send SMS messages with Twilio
Knock integrates with Twilio to send SMS notifications to your recipients.
- Delivery tracking
- Per environment configuration
- Sandbox mode
We'll walk through a few steps to take in Twilio before jumping into how to configure Twilio within Knock.
Before you set up your Twilio SMS channel in Knock, you'll need to take the following steps in Twilio.
- Sign up for a Twilio account if you haven't already.
- Get your first SMS-enabled phone number in Twilio. You'll use this as the "from" phone number in your channel configuration within Knock. (We also support Twilio short codes and messaging services, but we won't be covering those in this guide.)
- If you're Twilio account is in trial mode, you'll need to pre-verify any phone numbers with Twilio that you plan to send to from Knock during testing.
Once you've completed those steps, you're ready to start sending SMS notifications with Knock.
You can create your Twilio channel under the "Channels" page in the Knock dashboard. Once the channel has been created, you'll need to configure each of your Knock environments to work with Twilio.
Each environment requires a Twilio account ID, an auth token, and a "from" resource within Twilio from which to send messages. This "from" resource can be a Twilio phone number, short code, or messaging service. (If you are using a phone number, keep in mind that all numbers used in Knock must be in E.164 format.)
In order to send an SMS notification you'll need a valid
phone_number property set on your recipient.