is_friend
Description
- Check if two users are friends.
Request Method
post
Request URL
{API_ADDRESS}/friend/is_friend
Header
Header Name | Example Value | Optional | Type | Description |
---|---|---|---|---|
operationID | 1646445464564 | Required | string | Used for global traceability, recommended to use a timestamp for uniqueness in each request. |
token | eyJhbxxxx3Xs | Required | string | Admin token |
Request Body Example
{
"userID1": "11111111",
"userID2": "11111112"
}
Field Name | Optional | Type | Description |
---|---|---|---|
userID1 | Required | string | User ID |
userID2 | Required | string | User ID |
Success Response Example
{
"errCode": 0,
"errMsg": "",
"errDlt": "",
"data": {
"inUser1Friends": true,
"inUser2Friends": true
}
}
Success Response Parameters
Parameter Name | Type | Description |
---|---|---|
errCode | int | Error code, 0 means success |
errMsg | string | Brief error message, empty if successful |
errDlt | string | Detailed error information, empty if successful |
data | object | General data object, structure below |
inUser1Friends | boolean | true: userID2 is in userID1 's friend list |
inUser2Friends | boolean | true: userID1 is in userID2 's friend list |
Failure Response Example
{
"errCode": 1004,
"errMsg": "RecordNotFoundError",
"errDlt": ": [1004]RecordNotFoundError"
}
Failure Response Parameters
Parameter Name | Type | Description |
---|---|---|
errCode | int | Error code, refer to the global error code documentation |
errMsg | string | Brief error message |
errDlt | string | Detailed error message |