Ban Users in a Specified RTC Room
Bans users in a specified RTC room. Banned users cannot rejoin the room within the designated time period.
Note
If banned users are currently in the room, they will be automatically kicked out.
Request Method
POST: https://data center domain/v2/rtc/rooms/{room_id}
/block-users
Signature Rule: All requests to RC server APIs require signature validation. For details, see API Request Signature.
Path Parameters
The HTTP request path includes the following parameters:
Path Parameter | Type | Required | Description |
---|---|---|---|
room_id | String | Yes | Room ID. Specify the ID of the room where the users to be banned are located. |
Request Body
The HTTP request body contains a JSON object with the following structure:
Body Parameter | Type | Required | Description |
---|---|---|---|
user_ids | String[] | Yes | List of user IDs to be banned |
minute | Number | Yes | Ban duration in minutes. Minimum: 1, Maximum: 43200 |
Request Example
POST /v2/rtc/rooms/room001/block-users HTTP/1.1
Host: api.rong-api.com
RC-App-Key: xxxxxxxxxx
RC-Timestamp: 1408710653491
RC-Nonce: 14314
RC-Signature: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Content-Type: application/json
{
"user_ids": [
"user_1",
"user_2"
],
"minute": 10, //Unit: minutes
}
Response
The HTTP response body contains a JSON object with the following structure:
code
: Business code in the HTTP response body.10000
indicates successful processing.
Response Example
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
"code": 10000
}