简体   繁体   中英

Twilio: Webhook not calling specified URL on phone number

Setting up to respond to SMS replies. I've gone to my Active Numbers page, selected the number (I only have one), gone to the Messaging Service section (again only one service) and in "A message comes in", I've specified the URL of one of our HTTP Handlers. It's a.Net Core handler that we use all the time. It will try to process anything sent to its URL:

https://ourserver/lmw/core/filemanager?SC=SMS

I send an SMS message to my personal number, reply "Help", and send that. Nothing hits that URL. I have it in the debugger and it catches anything I send it. It just doesn't get hit by the reply to the SMS message.

What am I doing wrong?.. or did I misunderstand how this works?

EDIT: I found an "Integration" section in the Messaging Service. It was set to "Defer to sender's webhook"... which sounds right but I changed it to "Send a webhook -- Invoke an HTTP webhook for all incoming messages"... which sounds like the same thing. Anyway, it didn't change a thing. I'm still not receiving a post on the http handler.

Please note that "Help" is a special keyword when using messaging services.

According to the Twilio Help Center :

Twilio does not forward HELP/INFO messages to your incoming message webhook by default. However, if you use Advanced Opt-Out for Messaging Services, Twilio does forward HELP/INFO requests to your inbound webhook.

This is not a good answer but I wanted to close this out. I started over and released my phone number and bought a new one. I went to Active Numbers and selected the new phone. In "A message comes in", I put my webhook url in both primary and primary fails and saved that.

I then went to Messaging, Services, and selected my service. In Integration, I clicked "Defer to sender's webhook" and then put the handler url in "Callback URL" and saved that.

I went to compliance and the first two were done but 3. Campaign Use Case was incomplete. I completed that.

In Opt-out management, I edited that and put in some of my own text.

After doing all this, I replied to the message and got a response in the handler. Not sure which one of these was the problem but doing it all over seemed to work. Sorry I can't provide a better insight.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM