getUserProfilePhotos
Get a user's profile photos.
Request
GET /:token/getuserprofilephotos
POST /:token/getuserprofilephotos
This method supports both GET and POST requests.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| user_id | Integer | Yes | Unique identifier of the target user |
| offset | Integer | No | Starting offset for the results, defaults to 0 |
| limit | Integer | No | Number 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
| Field | Type | Description |
|---|---|---|
| total_count | Integer | Total number of profile photos for the user |
| photos | PhotoSize[][] | Array of photos, each photo contains multiple versions in different sizes |
Error Codes
| Code | Description |
|---|---|
| 400 | Bad request parameters, e.g. limit out of range |
| 401 | Invalid or expired token |
| 404 | User not found |
| 500 | Internal server error |
