Twilio has provision for configuring callback URL while sending SMS, which is notified of events relating to changes in the delivery state of SMS.
What happens if my application misses one of these callback events? Say for example when my server is down and the callback request encounters a 502 or 500 response.
Does Twilio retry the callback?
If yes, how many attempts are made before abandoning the event notification?
Requesting to increase sender pool limit for a Messaging Service. If you need more than 400 message senders in a single Messaging Service, please contact Twilio Support about a Messaging Service sender pool limit increase.
The number of retry attempts Twilio will make if its connection to your webhook fails. The type of failure to retry on: 4xx — Any 4xx response from your webserver. 5xx — Any 5xx response from your webserver.
Inbound messages are queued at 500 messages per second for each Twilio destination. Twilio will make an HTTP request to the request URL for each message received at your number. Therefore, please make sure your server is capable of handling the load if you are expecting a large amount of concurrent inbound traffic.
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” .
Hope this thread isn't SUPER dead...
I set out to solve this problem myself by making twiliq.com. Disclosure: I'm the dude that made this thing.
You set it as your backup URL endpoint and it'll replay the message as often as you configure until your server recovers.
Twilio developer evangelist here.
Twilio webhooks (for SMS or phone calls) do not make retry attempts to the same URL if your application fails to respond with a 200 response.
However, you can supply a fallback URL that Twilio will request with the same parameters if your primary URL fails. We recommend that this fallback URL is not part of the same application so that if your main application is down, you can recover and continue the conversation, save the errors for later or return an error message to your user.
There is more detail on how best to use fallback URLs on the Twilio site.
Since an answer was posted for this Twilio has added support for retry attempts on webhooks. By default it will retry once on TCP connect or TLS handshake failures, but the type of failures it retries for can be adjusted and the number of retries can be set anywhere between and including 0 and 5.
Documentation can be found here: https://www.twilio.com/docs/usage/webhooks/webhooks-connection-overrides
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