A Media Object is a structured data representation of various media file types, including photos, audio files, voice recordings, videos, and documents. It contains metadata and attributes that describe and identify the media file.
Media Object Fields
Field | Type | Required | Description |
id | String | Yes | Unique identifier for the media file. |
width | Integer | Optional | The width of the media file (applicable to images and videos). |
height | Integer | Optional | The height of the media file (applicable to images and videos). |
size | Integer | Optional | The file size of the media, in bytes. |
duration | Integer | Optional | Duration of the media file (applicable to Video, Audio, or Voice Note) in seconds. |
performer | String | Optional | The performer of an audio file, as provided by the sender or retrieved from audio tags. |
name | String | Optional | The name of the media file, applicable to documents, as defined by the sender. |
title | String | Optional | The title of an audio file, as defined by the sender or extracted from audio tags. |
thumbnail | Optional | A thumbnail preview for the media file. |
đ Notes:
- Images & Videos include
width
,height
, andthumbnail
.
- Audio Files can include
performer
andtitle
.
- Documents have a
name
field.
- The
duration
field applies to video, audio, and voice messages.