Prediction

Events raised as a Channel Points Prediction starts, takes predictions, locks and resolves.

View as markdown
Provide feedback for this page

Channel Prediction Begin

The channel.prediction.begin subscription type sends a notification when a Prediction begins on the specified channel.

Subscription

Type
channel.prediction.begin
Version
1

Authorization

Requires one of the following:

  • A user access token that includes the channel:read:predictions or channel:manage:predictions scope.The User ID associated with the token must match the broadcaster_user_id in the event's condition.
  • An app access token.The application, through prior authorization, must have been granted:
    • The channel:read:predictions or channel:manage:predictions scope for the user represented by the broadcaster_user_id event condition.

Subscription Request Body

  • typeStringRequired
    The subscription type name: channel.prediction.begin.
  • versionStringRequired
    The subscription type version: 1.
  • conditionObjectRequired
    Subscription-specific parameters. Pass in the broadcaster user ID for the channel you want to receive prediction begin notifications for.
    Hide child attributesShow child attributes
    • condition.broadcaster_user_idStringRequired
      The broadcaster user ID of the channel for which "prediction begin" notifications will be received.
  • 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.broadcaster_user_idString
        The broadcaster user ID of the channel for which "prediction begin" notifications will be received.
    • 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.idString
      Channel Points Prediction ID.
    • event.broadcaster_user_idString
      The requested broadcaster ID.
    • event.broadcaster_user_loginString
      The requested broadcaster login.
    • event.broadcaster_user_nameString
      The requested broadcaster display name.
    • event.titleString
      Title for the Channel Points Prediction.
    • event.outcomesObject[]
      An array of outcomes for the Channel Points Prediction.
      Hide child attributesShow child attributes
      • event.outcomes.idString
        The outcome ID.
      • event.outcomes.titleString
        The outcome title.
      • event.outcomes.colorString
        The color for the outcome. Valid values are blue and pink. If the Prediction has two outcomes, one is blue and the other is pink. If it has more than two outcomes, all of them are blue.
    • event.started_atString
      The time the Channel Points Prediction started.
    • event.locks_atString
      The time the Channel Points Prediction will automatically lock.
Subscription Request Body Example
{
  "type": "channel.prediction.begin",
  "version": "1",
  "condition": {
    "broadcaster_user_id": "1337"
  },
  "transport": {
    "method": "webhook",
    "callback": "https://example.com/webhooks/callback",
    "secret": "s3cRe7"
  }
}
Event Payload Example
{
    "subscription": {
        "id": "f1c2a387-161a-49f9-a165-0f21d7a4e1c4",
        "type": "channel.prediction.begin",
        "version": "1",
        "status": "enabled",
        "cost": 0,
        "condition": {
            "broadcaster_user_id": "1337"
        },
         "transport": {
            "method": "webhook",
            "callback": "https://example.com/webhooks/callback"
        },
        "created_at": "2019-11-16T10:11:12.634234626Z"
    },
    "event": {
        "id": "bc637af0-7766-4525-9308-4112f4cbf178",
        "broadcaster_user_id": "1337",
        "broadcaster_user_login": "cool_user",
        "broadcaster_user_name": "Cool_User",
        "title": "Aren't shoes just really hard socks?",
        "outcomes": [
            {"id": "73085848-a94d-4040-9d21-2cb7a89374b7", "title": "Yeah!", "color": "blue"},
            {"id": "906b70ba-1f12-47ea-9e95-e5f93d20e9cc", "title": "No!", "color": "pink"}
        ],
        "started_at": "2020-07-15T17:16:03.17106713Z",
        "locks_at": "2020-07-15T17:21:03.17106713Z"
    }
}

Channel Prediction End

The channel.prediction.end subscription type sends a notification when a Prediction ends on the specified channel.

Subscription

Type
channel.prediction.end
Version
1

Authorization

Requires one of the following:

  • A user access token that includes the channel:read:predictions or channel:manage:predictions scope.The User ID associated with the token must match the broadcaster_user_id in the event's condition.
  • An app access token.The application, through prior authorization, must have been granted:
    • The channel:read:predictions or channel:manage:predictions scope for the user represented by the broadcaster_user_id event condition.

Subscription Request Body

  • typeStringRequired
    The subscription type name: channel.prediction.end.
  • versionStringRequired
    The subscription type version: 1.
  • conditionObjectRequired
    Subscription-specific parameters. Pass in the broadcaster user ID for the channel you want to receive prediction end notifications for.
    Hide child attributesShow child attributes
    • condition.broadcaster_user_idStringRequired
      The broadcaster user ID of the channel for which "prediction end" notifications will be received.
  • 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.broadcaster_user_idString
        The broadcaster user ID of the channel for which "prediction end" notifications will be received.
    • 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.idString
      Channel Points Prediction ID.
    • event.broadcaster_user_idString
      The requested broadcaster ID.
    • event.broadcaster_user_loginString
      The requested broadcaster login.
    • event.broadcaster_user_nameString
      The requested broadcaster display name.
    • event.titleString
      Title for the Channel Points Prediction.
    • event.winning_outcome_idString
      ID of the winning outcome. If status is canceled, this is an empty string.
    • event.outcomesObject[]
      An array of outcomes for the Channel Points Prediction. Includes top_predictors.
      Hide child attributesShow child attributes
      • event.outcomes.idString
        The outcome ID.
      • event.outcomes.titleString
        The outcome title.
      • event.outcomes.colorString
        The color for the outcome. Valid values are blue and pink. If the Prediction has two outcomes, one is blue and the other is pink. If it has more than two outcomes, all of them are blue.
      • event.outcomes.usersInteger
        The number of users who chose this outcome. This includes viewers who took part without spending Channel Points, which happens where Channel Points can't be used on Predictions.
      • event.outcomes.channel_pointsInteger
        The total number of Channel Points used on this outcome.
      • event.outcomes.top_predictorsObject[]
        An array of the users who used the most Channel Points on this outcome, highest first. A viewer who took part without spending Channel Points can appear with a channel_points_used of 0.
        Hide child attributesShow child attributes
        • event.outcomes.top_predictors.user_idString
          The ID of the user.
        • event.outcomes.top_predictors.user_loginString
          The login of the user.
        • event.outcomes.top_predictors.user_nameString
          The display name of the user.
        • event.outcomes.top_predictors.channel_points_wonInteger
          The number of Channel Points paid out to the user, including the Channel Points they used. This value is 0 if the outcome did not win or if the Prediction was canceled and Channel Points were refunded.
        • event.outcomes.top_predictors.channel_points_usedInteger
          The number of Channel Points used to participate in the Prediction.
    • event.statusString
      The status of the Channel Points Prediction. Valid values are resolved and canceled.
    • event.started_atString
      The time the Channel Points Prediction started.
    • event.ended_atString
      The time the Channel Points Prediction ended.
Subscription Request Body Example
{
  "type": "channel.prediction.end",
  "version": "1",
  "condition": {
    "broadcaster_user_id": "1337"
  },
  "transport": {
    "method": "webhook",
    "callback": "https://example.com/webhooks/callback",
    "secret": "s3cRe7"
  }
}
Event Payload Example
{
    "subscription": {
        "id": "f1c2a387-161a-49f9-a165-0f21d7a4e1c4",
        "type": "channel.prediction.end",
        "version": "1",
        "status": "enabled",
        "cost": 0,
        "condition": {
            "broadcaster_user_id": "1337"
        },
         "transport": {
            "method": "webhook",
            "callback": "https://example.com/webhooks/callback"
        },
        "created_at": "2019-11-16T10:11:12.634234626Z"
    },
    "event": {
        "id": "1243456",
        "broadcaster_user_id": "1337",
        "broadcaster_user_login": "cool_user",
        "broadcaster_user_name": "Cool_User",
        "title": "Aren't shoes just really hard socks?",
        "winning_outcome_id": "12345",
        "outcomes": [
            {
                "id": "12345",
                "title": "Yeah!",
                "color": "blue",
                "users": 2,
                "channel_points": 600,
                "top_predictors": [
                    {
                        "user_name": "Cool_User",
                        "user_login": "cool_user",
                        "user_id": "1234",
                        "channel_points_won": 667,
                        "channel_points_used": 500
                    },
                    {
                        "user_name": "Coolest_User",
                        "user_login": "coolest_user",
                        "user_id": "1236",
                        "channel_points_won": 133,
                        "channel_points_used": 100
                    }
                ]
            },
            {
                "id": "22435",
                "title": "No!",
                "users": 2,
                "channel_points": 200,
                "color": "pink",
                "top_predictors": [
                    {
                        "user_name": "Cooler_User",
                        "user_login": "cooler_user",
                        "user_id": "12345",
                        "channel_points_won": 0,
                        "channel_points_used": 100
                    },
                    {
                        "user_name": "Elite_User",
                        "user_login": "elite_user",
                        "user_id": "1337",
                        "channel_points_won": 0,
                        "channel_points_used": 100
                    }
                ]
            }
        ],
        "status": "resolved",
        "started_at": "2020-07-15T17:16:03.17106713Z",
        "ended_at": "2020-07-15T17:16:11.17106713Z"
    }
}

Channel Prediction Lock

The channel.prediction.lock subscription type sends a notification when a Prediction is locked on the specified channel, either manually or automatically when its prediction window ends. A Prediction that is resolved or canceled while it's still active is never locked, so no lock notification is sent for it.

Note

The users, channel_points, and top_predictors values are the totals counted when the Prediction locked, and may not include predictions made just before it locked. The final totals are in the channel.prediction.end notification.

Subscription

Type
channel.prediction.lock
Version
1

Authorization

Requires one of the following:

  • A user access token that includes the channel:read:predictions or channel:manage:predictions scope.The User ID associated with the token must match the broadcaster_user_id in the event's condition.
  • An app access token.The application, through prior authorization, must have been granted:
    • The channel:read:predictions or channel:manage:predictions scope for the user represented by the broadcaster_user_id event condition.

Subscription Request Body

  • typeStringRequired
    The subscription type name: channel.prediction.lock.
  • versionStringRequired
    The subscription type version: 1.
  • conditionObjectRequired
    Subscription-specific parameters. Pass in the broadcaster user ID for the channel you want to receive prediction lock notifications for.
    Hide child attributesShow child attributes
    • condition.broadcaster_user_idStringRequired
      The broadcaster user ID of the channel for which "prediction lock" notifications will be received.
  • 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.broadcaster_user_idString
        The broadcaster user ID of the channel for which "prediction lock" notifications will be received.
    • 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.idString
      Channel Points Prediction ID.
    • event.broadcaster_user_idString
      The requested broadcaster ID.
    • event.broadcaster_user_loginString
      The requested broadcaster login.
    • event.broadcaster_user_nameString
      The requested broadcaster display name.
    • event.titleString
      Title for the Channel Points Prediction.
    • event.outcomesObject[]
      An array of outcomes for the Channel Points Prediction. Includes top_predictors.
      Hide child attributesShow child attributes
      • event.outcomes.idString
        The outcome ID.
      • event.outcomes.titleString
        The outcome title.
      • event.outcomes.colorString
        The color for the outcome. Valid values are blue and pink. If the Prediction has two outcomes, one is blue and the other is pink. If it has more than two outcomes, all of them are blue.
      • event.outcomes.usersInteger
        The number of users who chose this outcome. This includes viewers who took part without spending Channel Points, which happens where Channel Points can't be used on Predictions.
      • event.outcomes.channel_pointsInteger
        The total number of Channel Points used on this outcome.
      • event.outcomes.top_predictorsObject[]
        An array of the users who used the most Channel Points on this outcome, highest first. A viewer who took part without spending Channel Points can appear with a channel_points_used of 0.
        Hide child attributesShow child attributes
        • event.outcomes.top_predictors.user_idString
          The ID of the user.
        • event.outcomes.top_predictors.user_loginString
          The login of the user.
        • event.outcomes.top_predictors.user_nameString
          The display name of the user.
        • event.outcomes.top_predictors.channel_points_wonIntegerNullable
          The number of Channel Points won. This value is always null in the event payload for Prediction progress and Prediction lock. This value is 0 if the outcome did not win or if the Prediction was canceled and Channel Points were refunded.
        • event.outcomes.top_predictors.channel_points_usedInteger
          The number of Channel Points used to participate in the Prediction.
    • event.started_atString
      The time the Channel Points Prediction started.
    • event.locked_atString
      The time the Channel Points Prediction was locked.
Subscription Request Body Example
{
  "type": "channel.prediction.lock",
  "version": "1",
  "condition": {
    "broadcaster_user_id": "1337"
  },
  "transport": {
    "method": "webhook",
    "callback": "https://example.com/webhooks/callback",
    "secret": "s3cRe7"
  }
}
Event Payload Example
{
    "subscription": {
        "id": "f1c2a387-161a-49f9-a165-0f21d7a4e1c4",
        "type": "channel.prediction.lock",
        "version": "1",
        "status": "enabled",
        "cost": 0,
        "condition": {
            "broadcaster_user_id": "1337"
        },
         "transport": {
            "method": "webhook",
            "callback": "https://example.com/webhooks/callback"
        },
        "created_at": "2019-11-16T10:11:12.634234626Z"
    },
    "event": {
        "id": "bc637af0-7766-4525-9308-4112f4cbf178",
        "broadcaster_user_id": "1337",
        "broadcaster_user_login": "cool_user",
        "broadcaster_user_name": "Cool_User",
        "title": "Aren't shoes just really hard socks?",
        "outcomes": [
            {
                "id": "73085848-a94d-4040-9d21-2cb7a89374b7",
                "title": "Yeah!",
                "color": "blue",
                "users": 2,
                "channel_points": 700,
                "top_predictors": [
                    {
                        "user_name": "Cool_Viewer",
                        "user_login": "cool_viewer",
                        "user_id": "1234",
                        "channel_points_won": null,
                        "channel_points_used": 500
                    },
                    {
                        "user_name": "Coolest_User",
                        "user_login": "coolest_user",
                        "user_id": "1236",
                        "channel_points_won": null,
                        "channel_points_used": 200
                    }
                ]
            },
            {
                "id": "906b70ba-1f12-47ea-9e95-e5f93d20e9cc",
                "title": "No!",
                "color": "pink",
                "users": 1,
                "channel_points": 5000,
                "top_predictors": [
                    {
                        "user_name": "Cooler_User",
                        "user_login": "cooler_user",
                        "user_id": "12345",
                        "channel_points_won": null,
                        "channel_points_used": 5000
                    }
                ]
            }
        ],
        "started_at": "2020-07-15T17:16:03.17106713Z",
        "locked_at": "2020-07-15T17:21:03.17106713Z"
    }
}

Channel Prediction Progress

The channel.prediction.progress subscription type sends a notification when users participate in a Prediction on the specified channel.

Subscription

Type
channel.prediction.progress
Version
1

Authorization

Requires one of the following:

  • A user access token that includes the channel:read:predictions or channel:manage:predictions scope.The User ID associated with the token must match the broadcaster_user_id in the event's condition.
  • An app access token.The application, through prior authorization, must have been granted:
    • The channel:read:predictions or channel:manage:predictions scope for the user represented by the broadcaster_user_id event condition.

Subscription Request Body

  • typeStringRequired
    The subscription type name: channel.prediction.progress.
  • versionStringRequired
    The subscription type version: 1.
  • conditionObjectRequired
    Subscription-specific parameters. Pass in the broadcaster user ID for the channel you want to receive prediction progress notifications for.
    Hide child attributesShow child attributes
    • condition.broadcaster_user_idStringRequired
      The broadcaster user ID of the channel for which "prediction progress" notifications will be received.
  • 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.broadcaster_user_idString
        The broadcaster user ID of the channel for which "prediction progress" notifications will be received.
    • 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.idString
      Channel Points Prediction ID.
    • event.broadcaster_user_idString
      The requested broadcaster ID.
    • event.broadcaster_user_loginString
      The requested broadcaster login.
    • event.broadcaster_user_nameString
      The requested broadcaster display name.
    • event.titleString
      Title for the Channel Points Prediction.
    • event.outcomesObject[]
      An array of outcomes for the Channel Points Prediction. Includes top_predictors.
      Hide child attributesShow child attributes
      • event.outcomes.idString
        The outcome ID.
      • event.outcomes.titleString
        The outcome title.
      • event.outcomes.colorString
        The color for the outcome. Valid values are blue and pink. If the Prediction has two outcomes, one is blue and the other is pink. If it has more than two outcomes, all of them are blue.
      • event.outcomes.usersInteger
        The number of users who chose this outcome. This includes viewers who took part without spending Channel Points, which happens where Channel Points can't be used on Predictions.
      • event.outcomes.channel_pointsInteger
        The total number of Channel Points used on this outcome.
      • event.outcomes.top_predictorsObject[]
        An array of the users who used the most Channel Points on this outcome, highest first. A viewer who took part without spending Channel Points can appear with a channel_points_used of 0.
        Hide child attributesShow child attributes
        • event.outcomes.top_predictors.user_idString
          The ID of the user.
        • event.outcomes.top_predictors.user_loginString
          The login of the user.
        • event.outcomes.top_predictors.user_nameString
          The display name of the user.
        • event.outcomes.top_predictors.channel_points_wonIntegerNullable
          The number of Channel Points won. This value is always null in the event payload for Prediction progress and Prediction lock. This value is 0 if the outcome did not win or if the Prediction was canceled and Channel Points were refunded.
        • event.outcomes.top_predictors.channel_points_usedInteger
          The number of Channel Points used to participate in the Prediction.
    • event.started_atString
      The time the Channel Points Prediction started.
    • event.locks_atString
      The time the Channel Points Prediction will automatically lock.
Subscription Request Body Example
{
  "type": "channel.prediction.progress",
  "version": "1",
  "condition": {
    "broadcaster_user_id": "1337"
  },
  "transport": {
    "method": "webhook",
    "callback": "https://example.com/webhooks/callback",
    "secret": "s3cRe7"
  }
}
Event Payload Example
{
    "subscription": {
        "id": "f1c2a387-161a-49f9-a165-0f21d7a4e1c4",
        "type": "channel.prediction.progress",
        "version": "1",
        "status": "enabled",
        "cost": 0,
        "condition": {
            "broadcaster_user_id": "1337"
        },
         "transport": {
            "method": "webhook",
            "callback": "https://example.com/webhooks/callback"
        },
        "created_at": "2019-11-16T10:11:12.634234626Z"
    },
    "event": {
        "id": "bc637af0-7766-4525-9308-4112f4cbf178",
        "broadcaster_user_id": "1337",
        "broadcaster_user_login": "cool_user",
        "broadcaster_user_name": "Cool_User",
        "title": "Aren't shoes just really hard socks?",
        "outcomes": [
            {
                "id": "73085848-a94d-4040-9d21-2cb7a89374b7",
                "title": "Yeah!",
                "color": "blue",
                "users": 2,
                "channel_points": 700,
                "top_predictors": [
                    {
                        "user_name": "Cool_Viewer",
                        "user_login": "cool_viewer",
                        "user_id": "1234",
                        "channel_points_won": null,
                        "channel_points_used": 500
                    },
                    {
                        "user_name": "Coolest_User",
                        "user_login": "coolest_user",
                        "user_id": "1236",
                        "channel_points_won": null,
                        "channel_points_used": 200
                    }
                ]
            },
            {
                "id": "906b70ba-1f12-47ea-9e95-e5f93d20e9cc",
                "title": "No!",
                "color": "pink",
                "users": 1,
                "channel_points": 5000,
                "top_predictors": [
                    {
                        "user_name": "Cooler_User",
                        "user_login": "cooler_user",
                        "user_id": "12345",
                        "channel_points_won": null,
                        "channel_points_used": 5000
                    }
                ]
            }
        ],
        "started_at": "2020-07-15T17:16:03.17106713Z",
        "locks_at": "2020-07-15T17:21:03.17106713Z"
    }
}