Skip to main content

Creating a poll

To create a new poll, use the create method available on the meeting.polls object. The meeting.polls.create() function requires the following parameters:

ParamTypeRequiredDescription
questionStringyesThe question that is to be voted for.
optionsList<String>yesThe options of the poll.
anonymousBooleanyesIf true, the poll votes are anonymous.
hideVotesBooleanyesIf true, the votes on the poll are hidden.

The following snippet creates a poll where votes are anonymous.

val pollsCreateError: PollsError? = meeting.polls.create(
question = "Are you an early bird or a night owl?",
options = listOf("Early bird", "Night owl"),
anonymous = true,
hideVotes = false
)