Skip to content

getUserProfilePhotos

获取用户的头像列表。

请求

GET /:token/getuserprofilephotos

POST /:token/getuserprofilephotos

本方法同时支持 GET 和 POST 请求。

参数

参数类型必填描述
user_idInteger目标用户的唯一标识符
offsetInteger返回结果的起始偏移量,默认为 0
limitInteger返回的头像数量,取值范围 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_countInteger该用户的头像总数
photosPhotoSize[][]头像数组,每个头像包含多个不同尺寸的版本

错误码

错误码描述
400请求参数错误,如 limit 超出范围
401Token 无效或已过期
404用户不存在
500服务器内部错误