Skip to main content

Overview

Bans chatroom members. Banned members are removed from the chatroom and cannot rejoin.

Request

Authentication: Add authentication headers to the request. See Authentication.

Method: POST

Rate limit: 100 requests/second

Endpoint: https://API domain/apigateway/chatrooms/banmembers/add

Content-Type: application/json

Request Parameters

ParameterData TypeRequiredDescription
chat_idstringYesChatroom ID. Maximum length: 32 characters.
member_idsarrayYesIDs of the chatroom members to ban. Each user ID can contain up to 32 characters.
end_timenumberNoBan expiration time in milliseconds. A value of 0 indicates a permanent ban.
end_time_offsetnumberNoDuration in milliseconds. If end_time is not specified, the server calculates it by adding end_time_offset to the current time.

Request Example

POST /apigateway/chatrooms/banmembers/add HTTP/1.1
appkey: appkey
signature: 2e639ae3600a4sdff61fb88b76f485b
nonce: nonce
timestamp: 1672568121910
Content-Type: application/json

{
"chat_id":"chatroom1",
"member_ids":["member1","member2"]
}

Response Example

{
"code":0,
"msg":"sucess"
}