Ban a participant from an open channel
Bans a participant from an open channel. A banned participant is immediately expelled from the channel and allowed to participate in the channel again only after a set period of time has passed.
Note: To learn more about other available moderation tools, see Moderation Overview.
The following table lists the parameters that this action supports.
Specifies the URL of a channel.
The following table lists the properties of an HTTP request that this action supports.
Specifies the ID of a user.
Specifies the ID of an operator who bans a user.
Specifies the duration of ban in seconds. If set to -1, a user will be banned for ten years, which refers to a permanent ban on the Sendbird Dashboard. (Default: -1)
Specifies the reason for the ban. The maximum length is 250 characters.
If successful, this action returns the banned user resource and ban information in the response body.
List of response properties
The user resource that contains brief information about the banned user.
The time when the user becomes banned in the channel. The value is in Unix milliseconds format.
The timestamp of when the ban is scheduled to end. The value is in Unix milliseconds format.
The reason for the ban.
In the case of an error, an error object is returned. A detailed list of error codes is available here.