I am having an issue with Twilio inbound webhook configuration. When I text the number it reaches out to the webhook url given to me by the Twilio integration UI.
In the Twilio Debugger -> POST -> Request -> Message Text
In the Twilio Integration UI(in Home Assistant), it says I should configure the content type to be “application/x-www-form-urlenconded”, but I can’t find that setting in Twilio or Home Assistant.
I can select the webhook service if I go to Twilio - Menu - Phone Numbers -
select the number you’d like, then scroll down and change the configuration from “messaging service” to webhook…
It doesn’t specifically say URL encoded, but I think this is the option you want. I used that setting for inbound to a service called “Textable”. That worked well until my sms volume began to big down their load times.
I ran into this too, but at least for me it doesn’t seem to actually impact the ability to consume the inbound events in Home Assistant, since it does successfully call the webhook. If you go into the Developer Tools > Events UI in Home Assistant and listen to the “twilio_data_received” event, then send a SMS, you will see the inbound text message trigger an event there.
It seems like more of an annoyance from the Twilio side, since it registers there as an error even though it did succeed.
Using justjohn’s steps, I can see the event too. I can’t recall if I could see it before or not. What is interesting is that I can’t see the “configure” option on the Twilio integration page. I tried upgrading my supervisor, but that didn’t help. I am pretty sure it used to be there.
- alias: Test
trigger:
platform: webhook
webhook_id: new_sms
action:
service: persistent_notification.create
data:
message: '{{ trigger.data.Body }}'
title: New SMS
When I send a SMS to my Twilio phone number my HA dashboard notification panel gets a text message and passes the body of the SMS to the notification body. Pretty cool. From this point on you could parse the SMS and have HA do whatever you want. I plan on writing up a more detailed tutorial on this setup.
Troubleshooting:
I do believe I installed the Twilio integrating and reinstalled it to get it to work and of course rebooting your server always helps