Customizing Users’ Opt-in and Opt-out Experience with Advanced Opt-Out
In this tutorial, we will set up opt-in, opt-out, and help keywords and confirmation messages with the Advanced Opt-Out feature of Messaging Services. Configuring these keywords is an effective way to localize the experience for your customers and end users all over the world.
Twilio, by default, handles standard English-language reply messages such as STOP, UNSTOP, UNSUBSCRIBE or CANCEL for Toll-Free and Long Code numbers, in accordance with industry standards. (Please consult our support documentation on Twilio's support for opt-out keywords for more.)
This guide covers customizing opt-in/opt-out keywords and messages for your Messaging Service using the Advanced Opt-Out feature.
Global opt-in and opt-out keywords are a feature of Twilio Messaging Services. A Messaging Service is a higher-level "bundling" of messaging functionality around a common set of senders, features, and configuration.
If you haven't already done so, create a new Messaging Service:
Create a Messaging Service
Create a Messaging Service and give it a name
Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl
_10
// Download the helper library from https://www.twilio.com/docs/node/install
_10
// Find your Account SID and Auth Token at twilio.com/console
_10
// and set the environment variables. See http://twil.io/secure
Copy down the Messaging Service SID (It starts with MGXXX). You'll need it in the next step when you associate a phone number with this Service.
Purchase an SMS capable phone number
Sending SMS messages requires an SMS capable phone number. You can search for and purchase available phone numbers in the Console. When you search, make sure that the number you choose is SMS capable. Check the appropriate box in the search UI to filter available numbers to those that are SMS capable.