Skip to main content

ChatPhoto

This object represents a chat photo.

📝 Schema

FieldTypeDescription
stringsmall_file_idFile identifier of small (160x160) chat photo. This file_id can be used only for photo download and only for as long as the photo is not changed.
stringsmall_file_unique_idFile identifier of small (160x160) chat photo. This file_id can be used only for photo download and only for as long as the photo is not changed.
stringbig_file_idFile identifier of big (640x640) chat photo. This file_id can be used only for photo download and only for as long as the photo is not changed.
stringbig_file_unique_idUnique file identifier of big (640x640) chat photo, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file.

⚙️ Get methods

getSmallFileId()

Retrieves the file identifier of the small (160x160) chat photo. This file_id can be used for photo download while the photo remains unchanged.

$smallFileId = $chatPhotoObject->getSmallFileId();

getSmallFileUniqueId()

Retrieves the unique file identifier of the small (160x160) chat photo. This identifier remains the same over time and for different bots.

$smallFileUniqueId = $chatPhotoObject->getSmallFileUniqueId();

getBigFileId()

Retrieves the file identifier of the big (640x640) chat photo. This file_id can be used for photo download while the photo remains unchanged.

$bigFileId = $chatPhotoObject->getBigFileId();

getBigFileUniqueId()

Retrieves the unique file identifier of the big (640x640) chat photo. This identifier remains the same over time and for different bots, but can't be used to download or reuse the file.

$bigFileUniqueId = $chatPhotoObject->getBigFileUniqueId();

➕ More

tip

For further information, refer to the official Bale documentation for more details.