I set up a callback URL for Twilio to POST the status of the outbound message. However, when I inspect the URL, I find these two parameters:
"SmsStatus" and "MessageStatus"
They seemed exactly the same to me, as the values of the two are always the same. And as I went through the documentation of Twilio website, I could not find any explanation on the difference between these two parameters. Does anyone know the difference?
Status Callbacks allow you to receive events related to the REST resources managed by Twilio: Rooms, Recordings and Compositions. All HTTP requests set the "Content-Type" header to “application/x-www-form-urlencoded” .
Twilio does not charge you for failed messages. Notice: Twilio charges for any message delivery attempt, whether it was successful or not. Messages with the statuses sent , delivered , and undelivered , will all be reflected in your project balance.
Each new SMS message from Twilio must be sent with a separate REST API request. To initiate messages to a list of recipients, you must make a request for each number to which you would like to send a message. The best way to do this is to build an array of the recipients and iterate through each phone number.
Twilio developer evangelist here.
I believe this is backwards compatibility for an older version of the API when it just supplied SMS messages (thus SmsStatus
). Now that the API refers to SMS and MMS messages, the parameter MessageStatus
was introduced, though they do match each other, as you have noticed.
For future proofing your work, I would recommend using the MessageStatus
parameter as that refers to the most recent part of the API.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With