Mute an account

Update time: 2023/10/24 06:43:24

Mute or unmute an account. If an account is muted, it cannot send messages in private chats, group chats, and chat rooms.

Request URL

httpPOST https://api.netease.im/nimserver/user/mute.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
accid String Yes User account
mute Boolean Yes Mute or unmute an account:
true: mute an account, false: unmute an account

Example

cURL request example

curlcurl -X POST -H "AppKey: go9dnk49bkd9jd9vmel1kglw0803mgq3" -H "Nonce: 4tgggergigwow323t23t" -H "CurTime: 1443592222" -H "CheckSum: 9e9db3b6c9abb2e1962cf3e6f7316fcc55583f86" -H "Content-Type: application/x-www-form-urlencoded" -d 'accid=zhangsan&mute=true'  'https://api.netease.im/nimserver/nimserver/user/mute.action'

Example response

json"Content-Type": "application/json; charset=utf-8"
{
  "code":200
}

Status codes

The status code returned in the HTTPS response body. For more information, see Status codes.

Was this page helpful?
Yes
No
  • Request URL
  • Request parameters
  • Example
  • cURL request example
  • Example response
  • Status codes