get_media
Retrieve the photo or file attached to a Telegram message; images come back scaled for viewing with message metadata, other files return details and a reason if not included.
Instructions
Get the photo or file attached to one message. A JPEG, PNG, WebP or GIF image comes back as an image you can look at, scaled to at most 1568 pixels on its longest side, after a JSON text block with the message's message_id, date, sender, text (the caption) and reply_to_msg_id, and the file's media_key, kind, file_name, mime_type, size_bytes, image_returned, width, height and scaled. Any other file returns only that JSON text block, with a note saying why the file is not included.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| chat_id | Yes | Chat ID (the chat's ref from list_chats) | |
| message_id | Yes | ID of the message that carries the media |