Remove a member
Update time: 2023/10/23 08:54:55
To remove a member out of a chat room, you must provide the chat room ID roomid
, the operator account accid
and the account to be removed targetAccid
.
Only the owner and managers can kick members out of a chat room.
API rate limit
A maximum of 100 calls per second for an application by default. When the limit is reached, requests will be temporarily blocked for 10 seconds.
Request URI
httpPOST https://api.netease.im/nimserver/chatroom/kickMember.action HTTP/1.1
Content-Type: application/x-www-form-urlencoded;charset=utf-8
Request parameters
- For information about how to set the header in a POST request, see API Call methods.
- The settings of the body in a POST request:
Parameter | Type | Required | Description |
---|---|---|---|
roomid | String | Yes | Chat room ID |
targetAccid | String | Yes | Target user account, the user to be removed |
accid | String | Yes | Operator account, only owners and administrators can remove members out of a chat room. |
notifyExt | String | No | Extension field |
Example
Example request (cURL)
curlcurl -X POST -H "AppKey: go9dnk4***03mgq3" -H "Nonce: 4tggg**323t23t" -H "CurTime: 1443592222" -H "CheckSum: 9e9db3b6c***fcc55583f86" -H "Content-Type: application/x-www-form-urlencoded" -d 'roomid=36&targetAccid=wmtest154&accid=wujie¬ifyExt=xxxx' 'https://api.netease.im/nimserver/chatroom/kickMember.action'
Example success response
json"Content-Type": "application/json; charset=utf-8"
{
"code":200
}
Example error response
json"Content-Type": "application/json; charset=utf-8"
{
"code": 414, // invalid parameter
"desc": "xxxx is empty"
}
Status codes
The following status codes are related to responses of this API. For more information, see Status codes.
Was this page helpful?