Removes an online user.
Function
Forces a user to leave a room.
Authorization Information
Each account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions. For details about the required permissions, see Permissions Policies and Supported Actions.
URI
POST /v2/apps/{app_id}/rooms/{room_id}/batch-remove-users
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| app_id | Yes | String | Application ID |
| room_id | Yes | String | Room ID |
Request Parameters
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| Content-Type | Yes | String | Content type. The value is application/json. |
| X-Auth-Token | No | String | User token. This parameter is mandatory when token authentication is used. The token can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is the user token. |
| Authorization | No | String | Authentication information. This parameter is mandatory for AK/SK authentication. |
| X-Sdk-Date | No | String | Time when the request is sent. This parameter is mandatory for AK/SK authentication. |
| X-Project-Id | No | String | Project ID. This parameter is mandatory when AK/SK-based authentication is used. |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| user_ids | Yes | Array of strings | User ID list. |
Response Parameters
Status code: 202
| Parameter | Type | Description |
|---|---|---|
| X-request-Id | String | Request ID for task tracing. |
Status code: 400
| Parameter | Type | Description |
|---|---|---|
| X-request-Id | String | Request ID for task tracing. |
| Parameter | Type | Description |
|---|---|---|
| error_code | String | Error code. |
| error_msg | String | Description. |
Status code: 500
| Parameter | Type | Description |
|---|---|---|
| X-request-Id | String | Request ID for task tracing. |
| Parameter | Type | Description |
|---|---|---|
| error_code | String | Error code. |
| error_msg | String | Description. |
Example Requests
Remove users user001 and user002 in a specified room.
POST https://{endpoint}/v2/apps/{app_id}/rooms/{room_id}/batch-remove-users
{
"user_ids" : [ "user001", "user002" ]
} Example Responses
Status code: 400
The request cannot be understood by the server or parameters are incorrect.
{
"error_code" : "RTC.00001003",
"error_msg" : "InvalidParameterValue"
} Status code: 500
Request failed due to server error.
{
"error_code" : "RTC.00002xxx",
"error_msg" : "InternalError"
} Status Codes
| Status Code | Description |
|---|---|
| 202 | The request for kicking out a participant has been delivered. |
| 400 | The request cannot be understood by the server or parameters are incorrect. |
| 500 | Request failed due to server error. |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot