Overview
After private messaging is blocked for a user, the user can no longer send private messages. Group and chatroom messages are unaffected. For example, if users repeatedly use private messages to redirect traffic or conduct illegal activities, you can disable their ability to send private messages.
Request
Authentication: Add authentication headers to the request. See Authentication.
Method:
POST
Rate limit:
100 requests/second
Endpoint: https://API domain/apigateway/users/blockusers/block
Content-Type:
application/json
Request Parameters
| Parameter | Data Type | Required | Description | |
|---|---|---|---|---|
| user_id | string | Yes | ID of the user whose private messages are being restricted. Maximum length: 32 characters. | |
| block_user_ids | array | Yes | List of users that the specified user is not allowed to message. Each user ID can contain up to 32 characters. |
Request Example
POST /apigateway/users/blockusers/block HTTP/1.1
appkey: appkey
signature: 2e639ae3600a4sdff61fb88b76f485b
nonce: nonce
timestamp: 1672568121910
Content-Type: application/json
{
"user_id":"user1",
"block_user_ids":["user2","user3"]
}
Response Example
{
"code":0,
"msg":"sucess"
}