createAnonymousToken()
createAnonymousToken(pollId: number): Promise<string>
Generate an anonymous voting token for a specific poll.
Parameters:
pollId
(number): The ID of the poll for which to generate the anonymous voting token.
Returns:
A
Promise
resolving to the generated anonymous voting token.
Example:
The createAnonymousToken
method allows you to generate a unique anonymous voting token for a specified poll. Users can use this token to anonymously participate in the corresponding poll without revealing their identity.
The generated token is essential for casting anonymous votes and retrieving poll information associated with anonymous submissions.
Note: Ensure that the provided pollId
exists and corresponds to an active poll in the system.
Last updated