I was working with twilio mms integration in my java application.i have some questions. what will be the webhook request URL format? how do I get the sender phone number? how do I test it from the country other than US/Canda?
1 Answers
Twilio developer evangelist here.
You can read about what the Twilio request will look like here: https://www.twilio.com/docs/sms/twiml#twilios-request-to-your-application
Briefly, the request will be an HTTP POST
request (by default, or you can change it to GET
).
If it is a POST
request, the body will be in the format application/x-www-form-urlencoded
. The request parameters will include things like MessageSid
for the incomin message's ID, Body
for the text body and NumMedia
for the number of attachments. You can read the URL of each attachment from the MediaUrl{n}
parameters, where "n" Is the index of the media. The sender phone number will be the From
parameter.
To test this from outside the US I usually buy a second Twilio number and use it along with the API to send messages to my primary number.

- 70,667
- 10
- 60
- 88