/ Platform API
Platform API
    Chat Platform API v3
    Chat Platform API
    Chat Platform API
    Version 3

    List voters of a poll option

    Copy link

    This action retrieves a list of users who voted for a poll option.


    HTTP request

    Copy link
    GET https://api-{application_id}.sendbird.com/v3/polls/{poll_id}/options/{option_id}/voters
    

    Parameters

    Copy link

    The following table lists the parameters that this action supports.

    Required
    Property nameTypeDescription

    poll_id

    integer

    Specifies the unique ID of a poll that the target option belongs to.

    option_id

    integer

    Specifies the unique ID of a poll option.


    Request body

    Copy link

    The following table lists the properties that this action supports.

    Optional
    Property nameTypeDescription

    token

    string

    Specifies the token to get the next page of voters. You can get this value from the next property of the previous API response.

    limit

    integer

    Specifies the number of voters to return per page. Acceptable values are 1 to 100, inclusive. (Default: 100)


    Response

    Copy link

    If successful, it returns vote_count and voters of the specified option.

    {
        "vote_count": 135,
        "voters": [             // If the number of voters exceed the limit,
            {                   // the list is paginated.
                "nickname": "Sasha",
                "metadata": {},
                "profile_url": "",
                "user_id": "sf_to_nyc"
            },
            {
                "nickname": "Randall",
                "metadata": {},
                "profile_url": "",
                "user_id": "tennis2115"
            },
            // More voter representations follow here.
        ],
        "next": "pNsRScFRrZaIEERRx1RcE2d0FUZSUlkJFVQRHB86"
    }
    

    List of response properties

    Copy link
    Property nameTypeDescription

    voters

    array of objects

    An array of user resource properties of voters.

    next

    string

    The value for the token parameter to retrieve the next page in the result set. If the value of this property is empty, there is no next page.

    In the case of an error, an error object is returned. A detailed list of error codes is available here.