Telegram CoPilot icon

Telegram CoPilot

Your Personal Telegram CoPilot

Message → Send Message with Photo

AI-generated

Summary

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"

Links

Discussion