Only the operators of the channel are allowed to delete a channel. To delete a channel, follow the code below.
// const sb = SendbirdChat.init(...); // For Sendbird Chat SDK initialization details, refer to: // https://sendbird.com/docs/chat/sdk/v4/javascript/getting-started/send-first-message#2-get-started-3-step-2-initialize-sendbird-chat-sdk const channel = sb.openChannel.getChannel(CHANNEL_URL); await channel.delete();
// const sb = SendbirdChat.init(...); // For Sendbird Chat SDK initialization details, refer to: // https://sendbird.com/docs/chat/sdk/v4/javascript/getting-started/send-first-message#2-get-started-3-step-2-initialize-sendbird-chat-sdk const channel = sb.groupChannel.getChannel(CHANNEL_URL); await channel.delete();