Chat / JavaScript
Chat JavaScript v4
Chat JavaScript
Chat
JavaScript
Home
/
Chat
/
JavaScript
/
Channel
This is the new Docs for Chat SDK v4 for JavaScript. To see the previous Docs, click here.

Delete a channel

Only the operators of the channel are allowed to delete a channel. To delete a channel, follow the code below.

Open channel

const channel: OpenChannel = sb.openChannel.getChannel(CHANNEL_URL);
await channel.delete();

Group channel

const channel: GroupChannel = sb.groupChannel.getChannel(CHANNEL_URL);
await channel.delete();