get_profile_photos()¶
-
Client.get_profile_photos()¶ Get a list of profile pictures for a user or a chat.
- Parameters
chat_id (
int|str) – Unique identifier (int) or username (str) of the target chat. For your personal cloud (Saved Messages) you can simply use “me” or “self”. For a contact that exists in your Telegram address book you can use his phone number (str).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 profile photos is returned.
Example
# Get the first 100 profile photos of a user app.get_profile_photos("haskell") # Get only the first profile photo of a user app.get_profile_photos("haskell", limit=1) # Get 3 profile photos of a user, skip the first 5 app.get_profile_photos("haskell", limit=3, offset=5)