Polyv Help Center

Help Center

Force Users to Leave the Mic

Updated: 2026-11-23 17:37:01

API Description

Force users who are currently on the mic to leave. The API removes users based on the RTC type currently used by the channel and synchronously updates the mic status of the chat room.

API URL

https://api.polyv.net/live/v3/channel/mic/remove-user

Online API Call

Request Method

POST

API Constraints

  1. The API supports the HTTPS protocol, and API calls are subject to frequency limits. For details, please see.

  2. The API is only valid for users who are currently on the mic.

  3. A Tencent RTC channel can remove up to 10 users at a time; Volcano RTC and Agora RTC channels support removing only 1 user at a time.

Request Parameter Description

Parameter Name Required Type Description
appId true String Account appId [see Get Key for details]
timestamp true Long Current 13-digit millisecond timestamp, valid for 3 minutes
sign true String Signature, a 32-character uppercase MD5 value. The appSecret key used to generate the signature is critical information for communication data security and must never be saved on the client for direct use. All APIs must be called through the customer's own server to relay requests to the POLYV server and obtain response data [see Signature Generation Rules for details]
roomId true String Channel ID
userIds true String IDs of the users to be forced to leave the mic. Separate multiple user IDs with half-width commas, up to 10 at a time
rtcUserId false String Third-party RTC user ID, used for Agora RTC channels. If not passed, the value of userIds is used
removeSecond false Integer Duration in seconds during which the user is prohibited from going back on the mic after being removed. The default value is 0, which means the user can immediately reapply to go on the mic after removal

Example

https://api.polyv.net/live/v3/channel/mic/remove-user

Form parameters:

appId=frlr1zazn3&timestamp=1732348800000&roomId=2191569&userIds=user001&removeSecond=60&sign=19E2B706E637BDDD0AC6865DA8E1FF8E

Response Parameter Description

Parameter Name Type Description
code Integer Response status code; 200 indicates a successful return, and non-200 indicates failure [see Global Error Description for details]
status String Response status text information
message String Response description information; used to help describe the error cause when the request fails
data Boolean Whether the forced mic removal succeeded. Returns true on success, and empty on failure

Response Example

Success example:

{
  "code": 200,
  "status": "success",
  "message": "",
  "data": true
}

Failure example:

{
  "code": 500,
  "status": "error",
  "message": "remove user fail",
  "data": null
}

Error Codes

Error Code Description
200 Request successful
400 Request parameter error or signature verification failed
500 Forced mic removal failed. The user may not be on the mic, the number of users may exceed the limit of the current RTC type, or the RTC service call failed

Notes

  1. userIds should be filled with the chat room user ID, not the live streaming account ID.

  2. Tencent RTC channels support passing multiple user IDs at a time, separated by half-width commas, up to 10; Volcano RTC and Agora RTC channels can accept only 1 user ID at a time.

  3. removeSecond indicates the duration during which a user is prohibited from going back on the mic after being forced to leave. If not passed, it defaults to 0, and the user can immediately reapply to go on the mic.

  4. The API is only valid for users who are currently on the mic. After a successful call, the user is removed from the RTC room, and the mic status of the chat room is also synchronously updated.

联系客服,在线咨询
在线咨询