voteAnonymously()
voteAnonymously(anonymousPollToken: string, optionIds: EntryIdType[], userId?: string): Promise<boolean>
Submit an anonymous vote for a poll.
Parameters:
anonymousPollToken
(string): The anonymous voting token for the target poll.optionIds
(EntryIdType[]): An array of option IDs representing the user's vote.userId
(string, optional): An optional unique user identifier.
Returns:
A
Promise
resolving to a boolean indicating whether the vote was successfully submitted.
Example:
The voteAnonymously
method enables users to anonymously cast their votes for a specific poll using the provided anonymous voting token. Users can select multiple options (optionIds
) and may optionally provide a unique user identifier (userId
).
This method returns a boolean value indicating the success of the vote submission. A true
value means the vote was successfully recorded, while false
indicates an unsuccessful attempt.
Note: Ensure that the provided anonymousPollToken
is valid and corresponds to an existing anonymous voting session.
Last updated