Actions43
- Chat Actions
- Add Chat Members
- Close Chat
- Close Chat (Lite)
- Create SuperGroup or Channel
- Delete Chat
- Get Chat
- Get Chat History
- Get Chats
- Join Chat
- Mark Chat as Unread
- Open Chat
- Open Chat (Lite)
- Search Public Chat (by Username, Lite)
- Search Public Chat (by Username)
- Search Public Chats (Search in Username, Title)
- Send Chat Action
- Contact Actions
- Custom Request Actions
- File Actions
- Group Actions
- Login Actions
- Message Actions
- User Actions
Message → Send Message with Photo
AI-generatedSummary
Send a photo to a chat
Inputs
- chat_id (required) — ID of the chat to send the photo to
- localFilePath (required) — Local path to the photo file on the execution environment
- photoCaption — Optional caption for the photo
- reply_to_msg_id — Message ID to reply to, if any
- message_thread_id — Thread identifier to send the message into, if any
Output shape
Telegram message object representing the sent photo
The returned object contains the usual Telegram API response fields (e.g., message_id, date, chat, etc.) and may include error details if the operation fails.
Examples
Example 1: Send a photo with a caption to a known chat
chat_id = 123456789, localFilePath = /files/photo.png, photoCaption = "Best shot"
Example 2: Send a photo replying to an existing message
chat_id = 987654321, localFilePath = /files/image.jpg, reply_to_msg_id = "12345"
Example 3: Send a photo into a thread within a supergroup
chat_id = 11223344, localFilePath = /tmp/pic.gif, message_thread_id = 55, photoCaption = "Thread update"