add_black
Brief Description
- Add
blackUserID
toownerUserID
's blacklist, so thatblackUserID
cannot send messages toownerUserID
anymore.
Request Method
post
Request URL
{API_ADDRESS}/friend/add_black
Header
Header Name | Example Value | Optional | Type | Description |
---|---|---|---|---|
operationID | 1646445464564 | Required | string | operationID is used for global link tracking |
token | eyJhbxxxx3Xs | Required | string | Administrator token |
Request Sample Parameters
{
"ownerUserID": "11111111",
"blackUserID": "11111113",
"ex":"ex"
}
Field Name | Optional | Type | Description |
---|---|---|---|
ownerUserID | Required | string | User for whom the blacklist is added |
blackUserID | Required | string | ID of the user being blacklisted |
ex | Optional | string | Extension field |
Successful Return Sample
{
"errCode": 0,
"errMsg": "",
"errDlt": ""
}
Successful Return Sample Explanation
Parameter Name | Type | Description |
---|---|---|
errCode | int | Error code, 0 indicates success |
errMsg | string | Brief error message, empty when no error |
errDlt | errDlt | Detailed error message, empty when no error |
data | object | General data object, the specific structure is shown below |
Failed Return Sample
{
"errCode": 1003,
"errMsg": "DuplicateKeyError",
"errDlt": "==> github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/relation.(*BlackGorm).Create()@20->->Error 1062Error 1062: Duplicate entry '561373702-847892217' for key 'PRIMARY'"
}
Failed Return Sample Explanation
Parameter Name | Type | Description |
---|---|---|
errCode | int | Error code, refer to the global error code document |
errMsg | string | Brief error message |
errDlt | errDlt | Detailed error message |