Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Difference between SmsStatus and MessageStatus from Twilio Callback POST

Tags:

twilio

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?

like image 313
oopsdazie Avatar asked Jan 25 '16 16:01

oopsdazie


People also ask

What is status callback URL in Twilio?

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” .

Does Twilio charge for failed SMS?

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.

How do I send a message to multiple numbers in Twilio?

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.


1 Answers

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.

like image 66
philnash Avatar answered Oct 13 '22 01:10

philnash