---
agentTools:
  projectIndex: https://telegram-bot-sdk.readme.io/llms.txt
---

# getUserProfilePhotos

Use this method to get a list of profile pictures for a user.

Use this method to get a list of profile pictures for a user. Returns a [UserProfilePhotos](https://core.telegram.org/bots/api#userprofilephotos) object.

See [getUserProfilePhotos](https://core.telegram.org/bots/api#getuserprofilephotos) official docs for a list of supported parameters and other info.

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "API Settings",
    "version": "2.0"
  },
  "servers": [
    {
      "url": "https://api.telegram.org"
    }
  ],
  "security": [
    {}
  ],
  "paths": {
    "/bot{token}/getUserProfilePhotos": {
      "post": {
        "summary": "getUserProfilePhotos",
        "description": "Use this method to get a list of profile pictures for a user.",
        "operationId": "getuserprofilephotos",
        "parameters": [
          {
            "name": "token",
            "in": "path",
            "description": "Your Bot Token",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "user_id": {
                    "type": "integer",
                    "description": "Unique identifier of the target user",
                    "default": null,
                    "format": "int32"
                  },
                  "offset": {
                    "type": "integer",
                    "description": "Sequential number of the first photo to be returned. By default, all photos are returned.",
                    "default": null,
                    "format": "int32"
                  },
                  "limit": {
                    "type": "integer",
                    "description": "Limits the number of photos to be retrieved. Values between 1—100 are accepted. Defaults to 100.",
                    "default": null,
                    "format": "int32"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n    \"ok\": true,\n    \"result\": {\n        \"total_count\": 2,\n        \"photos\": [\n            [\n                {\n                    \"file_id\": \"AgABC12345678910111213abc...\",\n                    \"file_size\": 8394,\n                    \"width\": 160,\n                    \"height\": 160\n                },\n                {\n                    \"file_id\": \"AgABC12345678910111213abc...\",\n                    \"file_size\": 21897,\n                    \"width\": 320,\n                    \"height\": 320\n                },\n                {\n                    \"file_id\": \"AgABC12345678910111213abc...\",\n                    \"file_size\": 57547,\n                    \"width\": 640,\n                    \"height\": 640\n                }\n            ],\n            [\n                {\n                    \"file_id\": \"AgABC12345678910111213abc...\",\n                    \"file_size\": 12119,\n                    \"width\": 160,\n                    \"height\": 160\n                },\n                {\n                    \"file_id\": \"AgABC12345678910111213abc...\",\n                    \"file_size\": 40456,\n                    \"width\": 320,\n                    \"height\": 320\n                },\n                {\n                    \"file_id\": \"AgABC12345678910111213abc...\",\n                    \"file_size\": 145749,\n                    \"width\": 640,\n                    \"height\": 640\n                }\n            ]\n        ]\n    }\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "example": true,
                      "default": true
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "total_count": {
                          "type": "integer",
                          "example": 2,
                          "default": 0
                        },
                        "photos": {
                          "type": "array",
                          "items": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "file_id": {
                                  "type": "string",
                                  "example": "AgABC12345678910111213abc..."
                                },
                                "file_size": {
                                  "type": "integer",
                                  "example": 8394,
                                  "default": 0
                                },
                                "width": {
                                  "type": "integer",
                                  "example": 160,
                                  "default": 0
                                },
                                "height": {
                                  "type": "integer",
                                  "example": 160,
                                  "default": 0
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n    \"ok\": false,\n    \"error_code\": 400,\n    \"description\": \"[Error]: Bad Request: user not found\"\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "example": false,
                      "default": true
                    },
                    "error_code": {
                      "type": "integer",
                      "example": 400,
                      "default": 0
                    },
                    "description": {
                      "type": "string",
                      "example": "[Error]: Bad Request: user not found"
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false,
        "x-readme": {
          "code-samples": [
            {
              "language": "php",
              "code": "use Telegram\\Bot\\Api;\n\n$telegram = new Api('BOT TOKEN');\n\n$response = $telegram->getUserProfilePhotos(['user_id' => 'USER_ID']);\n\n$photos_count = $response->getTotalCount();\n$photos = $response->getPhotos();",
              "name": "Standalone"
            },
            {
              "language": "php",
              "code": "$response = Telegram::getUserProfilePhotos(['user_id' => 'USER_ID']);\n\n$photos_count = $response->getTotalCount();\n$photos = $response->getPhotos();",
              "name": "Laravel"
            }
          ],
          "samples-languages": [
            "php"
          ]
        }
      }
    }
  },
  "x-readme": {
    "headers": [
      {
        "key": "User-Agent",
        "value": "Telegram Bot SDK - (https://github.com/irazasyed/telegram-bot-sdk)"
      }
    ],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true,
  "_id": "58b53b061065f9c438aa1ab4:57054109ecfca80e00999324"
}
```