getUserProfilePhotos
获取用户的头像列表。
请求
GET /:token/getuserprofilephotos
POST /:token/getuserprofilephotos
本方法同时支持 GET 和 POST 请求。
参数
| 参数 | 类型 | 必填 | 描述 |
|---|---|---|---|
| user_id | Integer | 是 | 目标用户的唯一标识符 |
| offset | Integer | 否 | 返回结果的起始偏移量,默认为 0 |
| limit | Integer | 否 | 返回的头像数量,取值范围 1-100,默认为 100 |
响应
返回 UserProfilePhotos 对象。
json
{
"ok": true,
"result": {
"total_count": 3,
"photos": [
[
{
"file_id": "AgACAgIAAxkBAAI...",
"file_unique_id": "AQADAgATxxx",
"file_size": 8500,
"width": 160,
"height": 160
},
{
"file_id": "AgACAgIAAxkBAAI...",
"file_unique_id": "AQADAgATyyy",
"file_size": 25000,
"width": 320,
"height": 320
}
],
[
{
"file_id": "AgACAgIAAxkBAAI...",
"file_unique_id": "AQADAgATzzz",
"file_size": 9200,
"width": 160,
"height": 160
}
]
]
}
}返回字段说明
| 字段 | 类型 | 描述 |
|---|---|---|
| total_count | Integer | 该用户的头像总数 |
| photos | PhotoSize[][] | 头像数组,每个头像包含多个不同尺寸的版本 |
错误码
| 错误码 | 描述 |
|---|---|
| 400 | 请求参数错误,如 limit 超出范围 |
| 401 | Token 无效或已过期 |
| 404 | 用户不存在 |
| 500 | 服务器内部错误 |
