Ban a User from a Channel
A 3-step recipe with Sendbird. We can help you get access.
Recipe · 3 steps
Ban a User from a Channel
with Sendbird
Validate the target then ban a user from a channel.
- Confirm the target user exists before moderating.
- Confirm the channel exists before issuing the ban.
- Ban the confirmed user from the confirmed channel.
What you'll need to have ready
- apiToken: Sendbird Api-Token from the dashboard.
- userId: User ID to ban.
- channelUrl: URL of the channel to ban the user from.
- seconds: Ban duration in seconds. -1 for a permanent ban.
- description: Reason recorded for the ban.
For your developer
Arazzo workflow sendbird:ban-user-from-channel, 3 operations: getUser → getGroupChannel → banUser. Specs on APIs.io.