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:
ParameterType RequiredDescription
roomid String YesChat room ID
targetAccidStringYes Target user account, the user to be removed
accidStringYesOperator account, only owners and administrators can remove members out of a chat room.
notifyExtStringNoExtension 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&notifyExt=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?
Yes
No
  • API rate limit
  • Request URI
  • Request parameters
  • Example
  • Example request (cURL)
  • Example success response
  • Example error response
  • Status codes