API Overview
Message Callbacks
Status Codes
Overview
Queries a user's friend list.
Request
Authentication: Add authentication headers to the request. See Authentication.
Method:
GET
Rate limit:
100 requests/second
Endpoint: https://API domain/apigateway/friends/query
Content-Type:
application/json
Request Parameters
| Parameter | Data Type | Required | Description | |
|---|---|---|---|---|
| user_id | string | Yes | User ID. Maximum length: 32 characters. | |
| order | int | No | Friend sort order. 0: descending; 1: ascending. | |
| limit | int | No | Number of friends to return. Default: 100. | |
| offset | string | No | Pagination offset. |
Request Example
GET /apigateway/friends/query?user_id=userid1&limit=100 HTTP/1.1
appkey: appkey
signature: 2e639ae3600a4sdff61fb88b76f485b
nonce: nonce
timestamp: 1672568121910
Content-Type: application/json
Response Example
{
"code":0,
"msg":"sucess",
"data":{
"items":[
{
"friend_id":"userid2",
"display_name":"xxx"
}
],
"offset":"xxxx"
}
}