Skip to main content

Voting on a poll

To register a vote on a poll, use the meeting.polls.vote() method. This method requires the following parameters:

ParamTypeDefault ValueRequiredDescription
pollMessagePoll-yesThe poll message to vote on.
pollOptionPollOption-yesThe option to vote for.

The following snippet votes for the 1st option on the 1st poll created in the meeting.

val poll: Poll = meeting.polls.items.first()
val selectedPollOption: PollOption = poll.options.first()

val pollsError: PollsError? = meeting.polls.vote(poll.id, selectedPollOption)