1
votes

In case of sent/delivered status, Twilio is POSTing to the requested webhook url with the following parameters: SmsSid, SmsStatus, MessageStatus, To, MessageSid, AccountSid, From, ApiVersion)

I am not able to emulate a failed/undelivered status with a trial account.

And the docs here says:

Twilio will POST the MessageSid along with the other standard request parameters as well as MessageStatus and ErrorCode.

My question is from the ErrorCode(numeric) how do you get the "ErrorMessage"/"ErrorDescription", something which is human readable.

Does Twilio pass that in any of the params in case of failed/undelivered status? I found the docs saying:

If your message status is failed or undelivered, the ErrorCode can give you more information about the failure.

But how? In form of any other extra params being passed by Twilio to our webhook url. If yes, what are the param name for them? Or a new api call using the ErrorCode?. How do you do that?

1

1 Answers

1
votes

Twilio developer evangelist here.

Human readable descriptions of the errors are available in the error reference in the Twilio docs.

The message delivery errors are the following:

30001: Message Delivery - Queue overflow

30002: Message Delivery - Account suspended

30003: Message Delivery - Unreachable destination handset

30004: Message Delivery - Message blocked

30005: Message Delivery - Unknown destination handset

30006: Message Delivery - Landline or unreachable carrier

30007: Message Delivery - Carrier violation

30008: Message Delivery - Unknown error

Hope this helps!