Poll

Events raised as a poll starts, collects votes and ends on a channel.

View as markdown
Provide feedback for this page

Channel Poll Begin

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

Subscription

Type
channel.poll.begin
Version
1

Authorization

Requires one of the following:

  • A user access token that includes the channel:read:polls or channel:manage:polls 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:polls or channel:manage:polls scope for the user represented by the broadcaster_user_id event condition.

Subscription Request Body

  • typeStringRequired
    The subscription type name: channel.poll.begin.
  • versionStringRequired
    The subscription type version: 1.
  • conditionObjectRequired
    Subscription-specific parameters. Pass in the broadcaster user ID for the channel you want to receive poll begin notifications for.
    Hide child attributesShow child attributes
    • condition.broadcaster_user_idStringRequired
      The broadcaster user ID of the channel for which "poll 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 "poll 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
      ID of the poll.
    • 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
      Question displayed for the poll.
    • event.choicesObject[]
      An array of the poll's choices. Each choice contains only its id and title. Vote counts are sent in channel.poll.progress and channel.poll.end notifications.
      Hide child attributesShow child attributes
      • event.choices.idString
        ID for the choice.
      • event.choices.titleString
        Text displayed for the choice.
    • event.bits_votingObject
      Not supported.
      Hide child attributesShow child attributes
      • event.bits_voting.is_enabledBoolean
        Not used; will be set to false.
      • event.bits_voting.amount_per_voteInteger
        Not used; will be set to 0.
    • event.channel_points_votingObject
      The Channel Points voting settings for the poll.
      Hide child attributesShow child attributes
      • event.channel_points_voting.is_enabledBoolean
        Indicates if Channel Points can be used for voting.
      • event.channel_points_voting.amount_per_voteInteger
        Number of Channel Points required to vote once with Channel Points.
    • event.started_atString
      The time the poll started.
    • event.ends_atString
      The time the poll will end.
Subscription Request Body Example
{
  "type": "channel.poll.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.poll.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": "ed961efd-8a3f-4cf5-a9d0-e616c590cd2a",
        "broadcaster_user_id": "1337",
        "broadcaster_user_login": "cool_user",
        "broadcaster_user_name": "Cool_User",
        "title": "Aren't shoes just really hard socks?",
        "choices": [
            {"id": "4c123012-1351-4f33-84b7-43856e7a0f47", "title": "Yeah!"},
            {"id": "279087e3-54a7-467e-bcd0-c1393fcea4f0", "title": "No!"},
            {"id": "6b3f3b44-2c4f-4f4e-9f63-1d0a4f6c2b9e", "title": "Maybe!"}
        ],
        "bits_voting": {
            "is_enabled": false,
            "amount_per_vote": 0
        },
        "channel_points_voting": {
            "is_enabled": true,
            "amount_per_vote": 10
        },
        "started_at": "2020-07-15T17:16:03.17106713Z",
        "ends_at": "2020-07-15T17:21:03.17106713Z"
    }
}

Channel Poll End

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

Note

You can receive two notifications for the same poll. When a poll ends on schedule or is ended early, you receive a notification with status set to completed or terminated. Shortly afterward the poll is archived, and you receive a second notification for the same poll id with status set to archived and the same vote counts. If a poll is archived while it's still running, for example by calling End Poll with status set to ARCHIVED, you receive only the archived notification. Use the poll id to avoid processing a poll more than once.

Subscription

Type
channel.poll.end
Version
1

Authorization

Requires one of the following:

  • A user access token that includes the channel:read:polls or channel:manage:polls 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:polls or channel:manage:polls scope for the user represented by the broadcaster_user_id event condition.

Subscription Request Body

  • typeStringRequired
    The subscription type name: channel.poll.end.
  • versionStringRequired
    The subscription type version: 1.
  • conditionObjectRequired
    Subscription-specific parameters. Pass in the broadcaster user ID for the channel you want to receive poll end notifications for.
    Hide child attributesShow child attributes
    • condition.broadcaster_user_idStringRequired
      The broadcaster user ID of the channel for which "poll 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 "poll 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
      ID of the poll.
    • 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
      Question displayed for the poll.
    • event.choicesObject[]
      An array of choices for the poll. Includes vote counts.
      Hide child attributesShow child attributes
      • event.choices.idString
        ID for the choice.
      • event.choices.titleString
        Text displayed for the choice.
      • event.choices.bits_votesInteger
        Not used; will be set to 0.
      • event.choices.channel_points_votesInteger
        Number of votes received via Channel Points.
      • event.choices.votesInteger
        Total number of votes received for the choice across all methods of voting.
    • event.bits_votingObject
      Not supported.
      Hide child attributesShow child attributes
      • event.bits_voting.is_enabledBoolean
        Not used; will be set to false.
      • event.bits_voting.amount_per_voteInteger
        Not used; will be set to 0.
    • event.channel_points_votingObject
      The Channel Points voting settings for the poll.
      Hide child attributesShow child attributes
      • event.channel_points_voting.is_enabledBoolean
        Indicates if Channel Points can be used for voting.
      • event.channel_points_voting.amount_per_voteInteger
        Number of Channel Points required to vote once with Channel Points.
    • event.statusString
      The status of the poll.

      Possible values

      • completed
        The poll ran for its full duration.
      • terminated
        The poll was ended before its scheduled end.
      • archived
        The poll was archived and is no longer visible on the channel. Also sent shortly after a completed or terminated notification for the same poll.
    • event.started_atString
      The time the poll started.
    • event.ended_atString
      The time the poll ended.
Subscription Request Body Example
{
  "type": "channel.poll.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.poll.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": "ed961efd-8a3f-4cf5-a9d0-e616c590cd2a",
        "broadcaster_user_id": "1337",
        "broadcaster_user_login": "cool_user",
        "broadcaster_user_name": "Cool_User",
        "title": "Aren't shoes just really hard socks?",
        "choices": [
            {"id": "4c123012-1351-4f33-84b7-43856e7a0f47", "title": "Blue", "bits_votes": 0, "channel_points_votes": 70, "votes": 120},
            {"id": "279087e3-54a7-467e-bcd0-c1393fcea4f0", "title": "Yellow", "bits_votes": 0, "channel_points_votes": 40, "votes": 140},
            {"id": "6b3f3b44-2c4f-4f4e-9f63-1d0a4f6c2b9e", "title": "Green", "bits_votes": 0, "channel_points_votes": 70, "votes": 80}
        ],
        "bits_voting": {
            "is_enabled": false,
            "amount_per_vote": 0
        },
        "channel_points_voting": {
            "is_enabled": true,
            "amount_per_vote": 10
        },
        "status": "completed",
        "started_at": "2020-07-15T17:16:03.17106713Z",
        "ended_at": "2020-07-15T17:21:03.17106713Z"
    }
}

Channel Poll Progress

The channel.poll.progress subscription type sends a notification when users respond to a poll on the specified channel.

Subscription

Type
channel.poll.progress
Version
1

Authorization

Requires one of the following:

  • A user access token that includes the channel:read:polls or channel:manage:polls 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:polls or channel:manage:polls scope for the user represented by the broadcaster_user_id event condition.

Subscription Request Body

  • typeStringRequired
    The subscription type name: channel.poll.progress.
  • versionStringRequired
    The subscription type version: 1.
  • conditionObjectRequired
    Subscription-specific parameters. Pass in the broadcaster user ID for the channel you want to receive poll progress notifications for.
    Hide child attributesShow child attributes
    • condition.broadcaster_user_idStringRequired
      The broadcaster user ID of the channel for which "poll 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 "poll 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
      ID of the poll.
    • 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
      Question displayed for the poll.
    • event.choicesObject[]
      An array of choices for the poll. Includes vote counts.
      Hide child attributesShow child attributes
      • event.choices.idString
        ID for the choice.
      • event.choices.titleString
        Text displayed for the choice.
      • event.choices.bits_votesInteger
        Not used; will be set to 0.
      • event.choices.channel_points_votesInteger
        Number of votes received via Channel Points.
      • event.choices.votesInteger
        Total number of votes received for the choice across all methods of voting.
    • event.bits_votingObject
      Not supported.
      Hide child attributesShow child attributes
      • event.bits_voting.is_enabledBoolean
        Not used; will be set to false.
      • event.bits_voting.amount_per_voteInteger
        Not used; will be set to 0.
    • event.channel_points_votingObject
      The Channel Points voting settings for the poll.
      Hide child attributesShow child attributes
      • event.channel_points_voting.is_enabledBoolean
        Indicates if Channel Points can be used for voting.
      • event.channel_points_voting.amount_per_voteInteger
        Number of Channel Points required to vote once with Channel Points.
    • event.started_atString
      The time the poll started.
    • event.ends_atString
      The time the poll will end.
Subscription Request Body Example
{
  "type": "channel.poll.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.poll.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": "ed961efd-8a3f-4cf5-a9d0-e616c590cd2a",
        "broadcaster_user_id": "1337",
        "broadcaster_user_login": "cool_user",
        "broadcaster_user_name": "Cool_User",
        "title": "Aren't shoes just really hard socks?",
        "choices": [
            {"id": "4c123012-1351-4f33-84b7-43856e7a0f47", "title": "Yeah!", "bits_votes": 0, "channel_points_votes": 7, "votes": 12},
            {"id": "279087e3-54a7-467e-bcd0-c1393fcea4f0", "title": "No!", "bits_votes": 0, "channel_points_votes": 4, "votes": 14},
            {"id": "6b3f3b44-2c4f-4f4e-9f63-1d0a4f6c2b9e", "title": "Maybe!", "bits_votes": 0, "channel_points_votes": 7, "votes": 9}
        ],
        "bits_voting": {
            "is_enabled": false,
            "amount_per_vote": 0
        },
        "channel_points_voting": {
            "is_enabled": true,
            "amount_per_vote": 10
        },
        "started_at": "2020-07-15T17:16:03.17106713Z",
        "ends_at": "2020-07-15T17:21:03.17106713Z"
    }
}