How to send SMS messages with Twilio

Knock integrates with Twilio to send SMS notifications to your recipients.

Features

  • Delivery tracking
  • Bounce Support
  • Knock link tracking
  • Per environment configuration
  • Sandbox mode

Getting started

You can create a new Twilio channel in the dashboard under the Integrations > Channels section. From there, you'll need to take some steps in Twilio before you can configure your Twilio channel within Knock.

1

Sign up for Twilio

Sign up for a Twilio account if you haven't already.

2

Get a Twilio phone number

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.)

3

Verify phone numbers (trial accounts only)

If your Twilio account is in trial mode, you'll need to pre-verify any phone numbers that you plan to send SMS messages to during testing with Knock.

4

Configuring Twilio in Knock

Now that you have your Twilio phone number, account ID and auth token, you're ready to configure your Twilio channel in the Knock dashboard under the Integrations > Channels section.

Channel configuration

The following channel settings should be configured per environment. Navigate to Integrations > Channels in your dashboard, select your Twilio channel, then click "Manage configuration" under the environment that you'd like to configure.

Recipient data requirements

In order to send an SMS notification you'll need a valid phone_number property set on your recipient.

Delivery tracking

Delivery tracking for Twilio can result in the following status updates to your message:

  • The message delivery is confirmed and Knock updates the message to delivered
  • The message was not delivered due to bad recipient(s) and Knock updates the message to bounced
  • The message was not delivered due to an error reported by Twilio and Knock updates the message to undelivered