Skip to content

getUserProfilePhotos

Get a user's profile photos.

Request

GET /:token/getuserprofilephotos

POST /:token/getuserprofilephotos

This method supports both GET and POST requests.

Parameters

ParameterTypeRequiredDescription
user_idIntegerYesUnique identifier of the target user
offsetIntegerNoStarting offset for the results, defaults to 0
limitIntegerNoNumber of photos to return, value range 1-100, defaults to 100

Response

Returns a UserProfilePhotos object.

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
        }
      ]
    ]
  }
}

Response Fields

FieldTypeDescription
total_countIntegerTotal number of profile photos for the user
photosPhotoSize[][]Array of photos, each photo contains multiple versions in different sizes

Error Codes

CodeDescription
400Bad request parameters, e.g. limit out of range
401Invalid or expired token
404User not found
500Internal server error