0

I'm building a text service with Twilio and configured and enabled the Advanced Opt-out / Opt-in settings in my messaging service.

When testing the opt-in with my custom keyword I get this back instead my custom message

Thanks for the message. Configure your number's SMS URL to change this message. Reply HELP for help . Reply STOP to unsubscribe. Msg&Data rates may apply.

The screenshot shows my custom keyword and message. I'm using a toll-free number.enter image description here

Any ideas as to why its not automatically sending the custom opt-in message?

dcotter
  • 312
  • 6
  • 22

1 Answers1

1

When you receive opt-in messages to your number the webhook request is still sent to the URL you configure for your number. It looks like you haven't configured that URL for your number yet, as that is the default response for a new number.

Head to the Twilio console to configure your number and update the URL for when a message comes in. You can set it to your own application's URL if you have built that out yet, or if you are still working on that you could use a TwiMLBin with an empty <Response> which doesn't respond if you don't have an application yet.

philnash
  • 70,667
  • 10
  • 60
  • 88
  • I'm still working on the application. Do I need a special endpoint for this to work or just the base url of my web service once its deployed? – dcotter Mar 04 '22 at 15:08
  • You need an endpoint that returns [TwiML](https://www.twilio.com/docs/messaging/twiml). – philnash Mar 04 '22 at 20:08
  • Thanks, is there a way to add the sender's number to a Twilio Opt-in list once my endpoint receives my specific keyword? – dcotter Mar 06 '22 at 02:36
  • 1
    The advanced opt-in is doing that for the keywords that you’ve set up. But you get the webhook so that you can respond to the opted in number. – philnash Mar 06 '22 at 04:14