/ SDKs / JavaScript
SDKs
Chat SDKs JavaScript v4
Chat SDKs JavaScript
Chat SDKs
JavaScript
Version 4

Retrieve a poll

Copy link

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

JavaScriptTypeScript
const params = {
  channelUrl: channel.url,
  channelType: ChannelType.GROUP,
  pollId: poll.id
};
const 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.