Keep the URL as https://myserver/v1/sms
(Twilio will add the parameters for you when it makes the request)
To the right of the webhook url field, change in the drop-down from HTTP POST
to HTTP GET
With this configuration, Twilio will send the parameters with its request as URL query parameters.
The names for the two parameters mentioned in your question are
From
(The phone number that sent the message) and
Body
(The text body of the message.).
Other parameters are: MessageSid
, SmsSid
, AccountSid
, MessagingServiceSid
, To
, NumMedia
You can read more here: https://www.twilio.com/docs/sms/twiml#twilios-request-to-your-application
If you'd like to have your own names for the GET parameters
then, probably the easiest would be to use Twilio Studio with a HTTP REQUEST
widget and configure the phone number with Studio Flow
instead of Webhook
.
The HTTP REQUEST
will let you make a GET
request and add your own parameters to it.
For the values you would use {{trigger.message.From}}
for your phoneNo
and {{trigger.message.Body}}
for your message
.
You can read more about Twilio Studio's widgets here: https://www.twilio.com/docs/studio/widget-library#http-request