Connect your channels
Connect SMS through Twilio
Use your Twilio number or Messaging Service to send and receive SMS in your inbox.
SMS connects through your own Twilio account. Text messages sent to your Twilio number arrive in your inbox as conversations, and your replies go back to the customer as SMS from that number.
What you need
- A Twilio account with an SMS-capable phone number.
- Either a Messaging Service that includes the number in its Sender Pool (recommended), or just the number itself.
- Your Account SID and Auth Token. Both are on the home page of the Twilio Console, under Account Info.
Texting US numbers
US carriers require A2P 10DLC registration before they deliver messages from a US local number to US phones. You register your brand and a campaign through Twilio; until the campaign is approved, messages to US numbers are not delivered. Canadian numbers do not need 10DLC registration. See Twilio's A2P 10DLC guide for the steps.
Steps
- Open the STS Connect Inbox and go to Settings → Inboxes → Add Inbox.
- Choose SMS. Twilio is already selected as the API provider.
- Enter an Inbox Name, for example the name customers know you by.
- Enter the Phone Number in international format, starting with
+(for example+15551234567). To use a Messaging Service instead, tick Use a Twilio Messaging Service and enter the Messaging Service SID, which starts withMG. - Enter your Account SID and Auth Token, then press Create Twilio Channel.
- Add the agents who should answer.
The incoming-message link is set for you
When you create the inbox, STS Connect sets the incoming-message link in your Twilio account automatically: on the Messaging Service's Integration page, or on the number's Messaging Configuration. There is nothing to copy.
One thing STS Connect cannot switch on for you: the countries your Twilio account may text. Twilio only allows that in its Console, for security. Before texting a new country, open Messaging → Settings → Geo permissions in Twilio, tick that country and save.
For reference, the link is https://app.stsconnect.chat/twilio/callback. Only change it if you moved things around in Twilio later, for example to a different service or number:
- Messaging Service: Messaging → Services → your service → Integration → Send a webhook, with the link as the request URL and the method POST.
- Phone number: Phone Numbers → Active numbers → your number → Messaging Configuration → A message comes in → Webhook, with the link as the URL and HTTP POST.
Test it
Text your Twilio number from a mobile phone. The message appears as a new conversation in the inbox within seconds. Reply from the inbox and check that the answer reaches the phone.
Troubleshooting
- Error 21612: the destination country does not accept messages from that kind of sender. For example, a US local number cannot text UK mobiles. Use a number from the recipient's country.
- Error 21408: sending to that country is switched off in your Twilio account. Turn it on under Messaging → Settings → Geo permissions.
- US messages fail with error 30034: the number is not yet registered to an approved A2P 10DLC campaign. See Texting US numbers above.
- Error 21610: the customer replied STOP. Messages to them are blocked until they text START.
- Incoming messages never arrive: check the link in the section above. The number must belong to the same Twilio account as the Account SID you entered; otherwise the link cannot be set automatically.
Consent
- Only text people who have agreed to receive messages from you.
- Honour STOP replies. Twilio handles STOP and START keywords for you by default, so a customer who opts out stops receiving messages.
- In Canada, Canada's Anti-Spam Legislation (CASL) applies to commercial messages.
Still stuck?
Email hello@stsconnect.chat with your company name and what you were trying to do. We answer on business days.