Push Notification

Update time: 2022/12/08 17:26:00

Specify whether client apps receive push notifications when Desktop clients are online.

Request URL

POST https://api.netease.im/nimserver/user/setDonnop.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 business parameters settings of the body in a POST request:

ParameterTypeRequiredDescription
accidStringYes CommsEase IM account
donnopOpen String Yes Specify whether app clients receive push notifications when desktop clients are online:
true: app clients do not receive push notifications, false: app clients receive push notifications.

Example

cURL request

curl -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&donnopOpen=true'  'https://api.netease.im/nimserver/user/setDonnop.action'

Example response

HTTP response in JSON

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

Status codes

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

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