- By URL — Provide an HTTP/HTTPS URL. Telegram downloads and sends it.
- By File ID — Reuse a file already uploaded to Telegram’s servers.
- By InputFile — Upload raw bytes generated in your code (e.g.,
User.getDataFile()).
sendPhoto
Sends a photo to a chat.BLP Example
sendAudio
Sends an audio file displayed in Telegram’s music player. Must be.MP3 or .M4A.
BLP Example
sendDocument
Sends a general file.BLP Example
sendVideo
Sends a video file. Telegram clients support.MP4 videos.
BLP Example
sendAnimation
Sends an animation (GIF or H.264/MPEG-4 video without sound).BLP Example
sendVoice
Sends a voice message. Audio must be in.OGG format encoded with OPUS.
BLP Example
sendVideoNote
Sends a rounded video note (max 1 minute). Used as video messages in Telegram.BLP Example
sendMediaGroup
Sends a group of photos, videos, documents, or audios as an album.Note: Only same-type media can be grouped together (e.g., only photos or only videos). Up to 10 items per group.
BLP Example
editMessageMedia
Edits the media content of an existing message (animation, audio, document, photo, or video).
InputMedia types:
photo, video, animation, audio, document
BLP Example
sendSticker
Sends a static or animated.WEBP sticker.
BLP Example
getFile
Gets basic info about a file and prepares it for downloading.BLP Example
