add_friend
Brief Description
- fromUserID sends a friend request to toUserID.
Request Method
post
Request URL
http://x.x.x.x:10002/friend/add_friend
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
{
"fromUserID": "11111111",
"toUserID": "11111113",
"reqMsg": "hello!",
"ex": ""
}
Field Name | Optional | Type | Description |
---|---|---|---|
fromUserID | Required | string | The user initiating the friend request |
toUserID | Required | string | The user receiving the friend request |
reqMsg | Optional | string | Request message |
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 (Note: No data object is provided) |
Failed Return Sample
{
"errCode": 1301,
"errMsg": "CanNotAddYourselfError",
"errDlt": "[1301]CanNotAddYourselfError"
}
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 |