My Particle event is executing a Webhook to Twilio. But the call fails with a message that the ‘To’ phone number is missing. But it is sending in JSON format and the JSON block has a To, From, and Body.
The call works just fine if I execute it as a cURL call from a console. Not sure why it does not see the data in the JSON block POSTed.
Does the Twilio SMS API take a request in JSON format? The example in the Twilio API docs uses URL encoded POST format, as does this community post which uses web form encoding (application/x-www-form-urlencoded).
Using curl with the -d option also defaults to application/x-www-form-urlencoded.
I think Rick is pointing out the actual cause for your issue, but in order to get the raw request you could temporarily redirect your webhook to a service like requestbin.com and see what they get and compare that against your expectations.
BTW - Multiple webhooks may be initiated for the same event trigger. So in my case, I am texting multiple smartphones when my Particle device senses an event.