Debugging Events Webhook (Beta) - Twilio
Register for SIGNAL by 8/31 for $250 off. Register now.

Debugging Events Webhook (Beta)

Overview

Note: this feature of the Debugger is in Beta. The webhook API documented here may be subject to change.

When an error or warning takes places on your Twilio account, this event is published into Twilio's Debugging System. This is the system that powers the Monitor Alerts API, Alert Triggers and the Console Debugger. The Console Debugger allows developers to configure an optional webhook to receive data about errors and warnings as they happen. This makes it easy for developers to react to problems with their application in a timely manner.

If the Console Debugger webhook is configured, Twilio will make an HTTP POST request debugging events as they occur. Please note that the webhook has a 100-character limit. Below is an overview of the parameters passed.

Debugging Event Callback Parameters

Property Description
Sid The ID of this Debugging Event.
AccountSid The ID of the Account for which this Debugging Event was recorded.
TimeStamp The datetime this Debugging Event happened, given in ISO 8601 format
Level DEBUG, INFO, WARNING, ERROR
PayloadType application/json
Payload JSON data specific to the Debugging Event.

Payload

The payload is a JSON object that provides more information about the Debugging Event in question.

Property Description Required?
resource_sid The ID of this Twilio Platform Resource that this error is associated with Y
service_sid The ID of the Twilio Platform Service that this error is associated with N
error_code The unique error code for this debugging event Y
more_info A subdocument containing more information about this debugging event N
webhook A subdocument containing Information about the request and response of the webhook associated with this debugging event. N

more_info

The more_info property of the payload is optional and contains additional information specific to the Twilio product/feature that published this debugging event.

webhook

The webhook property of the payload is optional. It is only present if a webhook request was associated with the debugging event.

{
'request': {
  'method': 'POST',
  'url': 'http://twimlets.com/forward?PhoneNumber=800-421-9004' 
  'headers': {
    'key': 'value' 
  },
  'parameters': {
    'key', 'value' 
  }
  },
  response: {
    'status_code': 200
    'headers': {
      'key': 'value'
    },
    'body': '<Response><Dial>800-421-9004</Dial></Response>'
  }
}

Need some help?

We all do sometimes; code is hard. Get help now from our support team, or lean on the wisdom of the crowd browsing the Twilio tag on Stack Overflow.