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 EventSub disables a shard due to the status of the underlying transport changing.

Subscription

Type
conduit.shard.disabled
Version
1

Authorization

Requires one of the following:

  • An app access token.The Client ID of the token used must match the Client ID in the condition. If conduit_id is specified, the client must be the owner of the conduit.

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 conduit ID to receive events for. 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. See Processing an Event.

      Specify this field only if method is set to webhook.

      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.

      Specify this field only if the method is set to webhook.

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

      Specify this field only if the method is set to websocket.

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

      Specify this field only if the method is set to conduit.

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 conduit ID to receive events for. If omitted, events for all of this client's conduits are sent.
    • subscription.created_atString
      The time the notification was created.
    • subscription.transportObject
      Transport-specific parameters.
      Hide child attributesShow child attributes
      • subscription.transport.methodString
        The transport method for EventSub.

        Possible values

        • webhook
        • websocket
        • conduit
      • subscription.transport.callbackString

        The callback URL where notifications are sent. The URL must use the HTTPS protocol and port 443. See Processing an Event.

        Specify this field only if method is set to webhook.

        NOTE: Redirects are not followed.

      • subscription.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.

        Specify this field only if the method is set to webhook.

      • subscription.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.

        Specify this field only if the method is set to websocket.

      • subscription.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.

        Specify this field only if the method is set to 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 new status of the transport.
    • event.transportObject
      The disabled transport.
      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"
        },
        "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",
            "session_id": "ad1c9fc3-0d99-4eb7-8a04-8608e8ff9ec9",
            "connected_at": "2020-11-10T14:32:18.730260295Z",
            "disconnected_at": "2020-11-11T14:32:18.730260295Z"
        }
    }
}