Chat / JavaScript
Chat JavaScript v4
Chat JavaScript
Chat
JavaScript
Version 4
Home
/
Chat
/
JavaScript
/
Message

Retrieve a poll

Copy link

You can retrieve a specific poll by creating and passing the PollRetrievalParams parameters in the sb.poll.get() method.

const params: PollRetrievalParams = {
  channelUrl: channel.url,
  channelType: ChannelType.GROUP,
  pollId: poll.id
};
const poll: Poll = await sb.poll.get(params);

PollRetrievalParams

Copy link
Parameter nameTypeDescription

channelUrl

string

Specifies the URL of the channel.

channelType

ChannelType

Specifies the type of the channel.

pollId

number

Specifies the unique ID of a poll.