Regulations require that you first register your number to use these resources to send SMS traffic to US and Canadian mobile destinations. If you are sending to Canada or the US and have not already done so, please see our documentation to register your Twilio phone number or Toll-Free number before you use this template.
Using this SMS Opt-In template, you can provide details like campaign name, message frequency, opt-in keywords, and your own styling to build your own customized opt-in form hosted on Twilio. Features include:
If you're applying for a short code or building an A2P 10DLC campaign list, this template app will show you the best practices for obtaining SMS opt-in.
The code for this sample is available on GitHub to view.
You will need an Account SID and Auth Token in order to run this code.
Checking for existing account...
Follow the setup instructions in the README to get the sample up and running.