Skip to main content

Get Poll Result

With the "Get Poll Result" method, you can retrieve the poll results in real-time and display in your application. You can integrate the above by following the given steps.

Steps to Get Poll Result

  1. To get poll results, use the getPollUsers() method provided by the client.
  2. Pass in the required parameter.
  3. Process the response as per your requirement.
const payload = {
conversationId: 12122, // Conversation Id
pollId: 40212, // Poll Id
};
const response = await lmChatClient.getPollUsers(payload);

if (response.success) {
// your function to process the response data
processResponse(response);
} else {
// your function to process error message
processError(response);
}

Get Poll Result Payload

VariableTypeDescriptionOptional
conversationIdnumberConversation Id
pollIdnumberPoll Id

Get Poll Result Response

VariableTypeDescriptionOptional
successbooleanIndicates the success status of the response
error_messagestringError message in case of failure✔️
dataobjectData object containing the list of members✔️