Conduit

Events raised when a conduit's shards change state.

View as markdown
Provide feedback for this page

Conduit Shard Disabled

The conduit.shard.disabled subscription type sends a notification when a conduit shard that was enabled changes to any other status, for example when the shard's WebSocket session disconnects or its webhook callback fails too many notifications.

You also will receive it when using Update Conduit Shards to assign a webhook to an enabled shard. In this case, the shard's status will become webhook_callback_verification_pending, and no further notification is sent if the callback then fails verification.

This event is not received for shards that weren't enabled (for example, a newly assigned webhook that fails callback verification), or for shards removed because you reduced the conduit's shard count or deleted the conduit.

Note

You can't create this subscription with the WebSocket transport.

Subscription

Type
conduit.shard.disabled
Version
1

Authorization

Requires one of the following:

  • An app access token.The Client ID in the token must match the client_id specified in the condition.

Subscription Request Body

  • typeStringRequired
    The subscription type name: conduit.shard.disabled.
  • versionStringRequired
    The subscription type version: 1.
  • conditionObjectRequired
    Subscription-specific parameters. Optionally pass in the conduit ID for the conduit you want to receive events for.
    Hide child attributesShow child attributes
    • condition.client_idStringRequired
      Your application's client id. The provided client_id must match the client ID in the application access token.
    • condition.conduit_idString
      The ID of one of your conduits to receive events for. If it isn't one of your conduits, the subscription never receives notifications. If omitted, events for all of this client's conduits are sent.
  • transportObjectRequired
    Transport-specific parameters.
    Hide child attributesShow child attributes
    • transport.methodStringRequired
      The transport method for EventSub.

      Possible values

      • webhook
      • websocket
      • conduit
    • transport.callbackString

      The callback URL where notifications are sent. The URL must use the HTTPS protocol and port 443, and its host must resolve to a public IPv4 address. Hosts that resolve only to IPv6 addresses aren't supported. See Processing an Event.

      Required if method is webhook. Don't specify it for other methods.

      NOTE: Redirects are not followed.

    • transport.secretString

      The secret used to verify the signature. The secret must be an ASCII string that's a minimum of 10 characters long and a maximum of 100 characters long. For information about how the secret is used, see Verifying the event message.

      Required if method is webhook. Don't specify it for other methods.

    • transport.session_idString

      An ID that identifies the WebSocket to send notifications to. When you connect to EventSub using WebSockets, the server returns the ID in the Welcome message.

      Required if method is websocket. Don't specify it for other methods.

    • transport.conduit_idString

      An ID that identifies the conduit to send this notification to. When you create a conduit, the server returns the ID in the API response.

      Required if method is conduit. Don't specify it for other methods.

Event Payload

  • subscriptionObject
    Metadata about the subscription.
    Hide child attributesShow child attributes
    • subscription.idString
      The Subscription ID of the subscription.
    • subscription.typeString
      The notification's subscription type.
    • subscription.versionString
      The version of the subscription.
    • subscription.statusString
      The status of the subscription.
    • subscription.costInteger
      How much the subscription counts against your limit. See Subscription Limits for more information.
    • subscription.conditionObject
      Subscription-specific parameters.
      Hide child attributesShow child attributes
      • subscription.condition.client_idString
        Your application's client id. The provided client_id must match the client ID in the application access token.
      • subscription.condition.conduit_idString
        The ID of one of your conduits to receive events for. If it isn't one of your conduits, the subscription never receives notifications. If the subscription doesn't specify a conduit, this is an empty string and events for all of this client's conduits are sent.
    • subscription.created_atString
      The UTC date and time (in RFC3339 format) of when the subscription was created.
    • subscription.transportObject
      The transport that the notification was sent over.
      Hide child attributesShow child attributes
      • subscription.transport.methodString
        The transport method.

        Possible values

        • webhook
        • websocket
        • conduit
      • subscription.transport.callbackString
        The callback URL where notifications are sent. Included only if method is webhook.
      • subscription.transport.session_idString
        The ID of the WebSocket session that notifications are sent to. Included only if method is websocket.
      • subscription.transport.conduit_idString
        The ID of the conduit that notifications are sent to. Included only if method is conduit.
  • eventObject
    The event information.
    Hide child attributesShow child attributes
    • event.conduit_idString
      The ID of the conduit.
    • event.shard_idString
      The ID of the disabled shard.
    • event.statusString
      The shard's new status.

      Possible values

      • webhook_callback_verification_pending
        The shard is pending verification of the specified callback URL. You get this status when you use Update Conduit Shards to assign a webhook callback to an enabled shard.
      • webhook_callback_verification_failed
        The specified callback URL failed verification.
      • notification_failures_exceeded
        The notification delivery failure rate was too high.
      • websocket_disconnected
        The client closed the connection.
      • websocket_failed_ping_pong
        The client failed to respond to a ping message.
      • websocket_received_inbound_traffic
        The client sent a non-pong message.
      • websocket_internal_error
        The Twitch WebSocket server experienced an unexpected error. Please report this issue on our issue tracker.
      • websocket_network_timeout
        The Twitch WebSocket server timed out writing the message to the client.
      • websocket_network_error
        The Twitch WebSocket server experienced a network error writing the message to the client.
      • websocket_failed_to_reconnect
        The client failed to reconnect to the Twitch WebSocket server within the required time after a Reconnect Message.
    • event.transportObject
      The shard's transport. If the shard was disabled because its WebSocket session disconnected or its webhook callback failed, this is that transport. If you assigned the shard a new webhook callback, this is the new callback.
      Hide child attributesShow child attributes
      • event.transport.methodString
        websocket or webhook
      • event.transport.callbackStringNullable
        Webhook callback URL. Null if method is set to websocket.
      • event.transport.session_idStringNullable
        WebSocket session ID. Null if method is set to webhook.
      • event.transport.connected_atStringNullable
        Time that the WebSocket session connected. Null if method is set to webhook.
      • event.transport.disconnected_atStringNullable
        Time that the WebSocket session disconnected. Null if method is set to webhook.
Subscription Request Body Example
{
  "type": "conduit.shard.disabled",
  "version": "1",
  "condition": {
    "client_id": "uo6dggojyb8d6soh92zknwmi5ej1q2"
  },
  "transport": {
    "method": "webhook",
    "callback": "https://example.com/webhooks/callback",
    "secret": "s3cRe7"
  }
}
Event Payload Example
{
    "subscription": {
        "id": "f1c2a387-161a-49f9-a165-0f21d7a4e1c4",
        "type": "conduit.shard.disabled",
        "version": "1",
        "status": "enabled",
        "cost": 0,
        "condition": {
            "client_id": "uo6dggojyb8d6soh92zknwmi5ej1q2",
            "conduit_id": ""
        },
        "transport": {
            "method": "webhook",
            "callback": "https://example.com/webhooks/callback"
        },
        "created_at": "2023-04-11T10:11:12.123Z"
    },
    "event": {
        "conduit_id": "bfcfc993-26b1-b876-44d9-afe75a379dac",
        "shard_id": "4",
        "status": "websocket_disconnected",
        "transport": {
            "method": "websocket",
            "callback": null,
            "session_id": "AQoQexAWVYKSTIu4ec_2VAxyuhAB",
            "connected_at": "2020-11-10T14:32:18Z",
            "disconnected_at": "2020-11-11T14:32:18Z"
        }
    }
}