Skip to main content

Voting on a poll

The meeting.polls.vote() method can be used to register a vote on a poll. It accepts the following params.

ParamTypeDefault ValueRequiredDescription
idstring-yesThe ID of the poll that is to be voted on.
indexnumber-yesThe index of the option.

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

let poll = meeting.polls.items.first
let selectedPollOption = poll.options.first
meeting.polls.vote(pollMessage: poll, pollOption: selectedPollOption)