Send messages and manage chats via a Telegram bot
https://api.telegram.org/bot{bot_token}/getMe
/sendMessage
| Param | Type | Required | Description |
|---|---|---|---|
| chat_id | string | required | Target chat: numeric chat ID, or '@channelusername' for a public channel |
| text | string | required | Message text (up to 4096 characters) |
| parse_mode | string | optional | Text formatting mode: 'MarkdownV2', 'HTML', or 'Markdown' (legacy) |
| disable_notification | boolean | optional | Send silently — users receive a notification with no sound |
| reply_to_message_id | integer | optional | ID of the message this is replying to, if any |
/sendPhoto
| Param | Type | Required | Description |
|---|---|---|---|
| chat_id | string | required | Target chat: numeric chat ID, or '@channelusername' for a public channel |
| photo | string | required | Public HTTPS URL of the photo, or a Telegram file_id |
| caption | string | optional | Caption to show under the photo (up to 1024 chars) |
| parse_mode | string | optional | Caption formatting mode: 'MarkdownV2', 'HTML', or 'Markdown' (legacy) |
/sendDocument
| Param | Type | Required | Description |
|---|---|---|---|
| chat_id | string | required | Target chat: numeric chat ID, or '@channelusername' for a public channel |
| document | string | required | Public HTTPS URL of the file, or a Telegram file_id |
| caption | string | optional | Caption to show under the file (up to 1024 chars) |
/editMessageText
| Param | Type | Required | Description |
|---|---|---|---|
| chat_id | string | required | Chat the message was sent in |
| message_id | integer | required | ID of the message to edit |
| text | string | required | New message text (up to 4096 characters) |
| parse_mode | string | optional | Text formatting mode: 'MarkdownV2', 'HTML', or 'Markdown' (legacy) |
/deleteMessage
| Param | Type | Required | Description |
|---|---|---|---|
| chat_id | string | required | Chat the message was sent in |
| message_id | integer | required | ID of the message to delete |
/getChat
| Param | Type | Required | Description |
|---|---|---|---|
| chat_id | string | required | Target chat: numeric chat ID, or '@channelusername' for a public channel |
/getChatMember
| Param | Type | Required | Description |
|---|---|---|---|
| chat_id | string | required | Target chat: numeric chat ID, or '@channelusername' for a public channel |
| user_id | integer | required | Numeric Telegram user ID of the member |
/getChatAdministrators
| Param | Type | Required | Description |
|---|---|---|---|
| chat_id | string | required | Target chat: numeric chat ID, or '@channelusername' for a public channel |