get_user_profile_photos()

Client.get_user_profile_photos(user_id: int | str, offset: int = 0, limit: int = 0) List[Photo] | None

Get a list of profile pictures for a user.

Usable by Users Bots
Parameters:
  • user_id (int | str) – Unique identifier of the target user.

  • offset (int, optional) – Sequential number of the first photo to be returned. By default, all photos are returned.

  • limit (int, optional) – Limits the number of photos to be retrieved. Values between 1-100 are accepted. Defaults to 100.

Returns:

List of Photo – On success, a list of photos is returned.

Example

photos = await app.get_user_profile_photos(user_id)
print(f"Total photos: {len(photos)}")