> ## Documentation Index
> Fetch the complete documentation index at: https://composio-preview.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Telegram

> Telegram is a cloud-based messaging app with a focus on security and speed. Build bots to send messages, manage chats, and interact with users.

![Telegram logo](https://mintcdn.com/composio-preview/IA0_SoMcsWt17HEC/images/toolkits/telegram.svg?fit=max\&auto=format\&n=IA0_SoMcsWt17HEC\&q=85\&s=9b7f57d6dcb08b15c5114ea672c409f5)

* **Category:** team chat
* **Auth:** API\_KEY
* **Composio-managed OAuth available?** N/A
* **Tools:** 18
* **Triggers:** 0
* **Slug:** `TELEGRAM`
* **Version:** 20261101\_00

## Tools

> [accordion] Answer Callback Query
>
> **Slug:** `TELEGRAM_ANSWER_CALLBACK_QUERY`
>
> Use this method to send answers to callback queries sent from inline keyboards. The answer will be displayed to the user as a notification at the top of the chat screen or as an alert.
>
> #### Input Parameters
>
> **url** `string`
>
> URL that will be opened by the user's client. If you have created a Game and accepted the conditions via @Botfather, specify the URL that opens your game – note that this will only work if the query comes from a callback\_game button.
>
> **text** `string`
>
> Text of the notification. If not specified, nothing will be shown to the user, 0-200 characters
>
> **cache\_time** `integer`
>
> The maximum amount of time in seconds that the result of the callback query may be cached client-side. Telegram apps will support caching starting in version 3.14. Defaults to 0.
>
> **show\_alert** `boolean`
>
> If True, an alert will be shown by the client instead of a notification at the top of the chat screen. Defaults to false.
>
> **callback\_query\_id** `string` *required*
>
> Unique identifier for the query to be answered Must be answered promptly after receipt; the ID expires quickly and delayed responses leave users with stuck spinners in the UI.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Export Chat Invite Link
>
> **Slug:** `TELEGRAM_CREATE_CHAT_INVITE_LINK`
>
> Generate a new primary invite link for a chat; any previously generated primary link is revoked. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights.
>
> #### Input Parameters
>
> **chat\_id** `string` *required*
>
> Unique identifier for the target chat or username of the target supergroup or channel
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Delete Message
>
> **Slug:** `TELEGRAM_DELETE_MESSAGE`
>
> Delete a message, including eligible service messages. Telegram imposes time and message-type restrictions; deletion rights depend on the chat and message, and administrators with appropriate rights can delete other users' messages.
>
> #### Input Parameters
>
> **chat\_id** `string` *required*
>
> Unique identifier for the target chat or username of the target channel In linked channel/discussion group pairs, deleting in one does not remove the corresponding post in the other — issue separate deletion calls with the correct chat\_id for each target.
>
> **message\_id** `integer` *required*
>
> Identifier of the message to delete
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Edit Message
>
> **Slug:** `TELEGRAM_EDIT_MESSAGE`
>
> Edit the text of a message identified by chat and message ID or inline message ID. Telegram's editing permissions and message restrictions apply.
>
> #### Input Parameters
>
> **text** `string` *required*
>
> New text of the message, 1-4096 characters after entities parsing
>
> **chat\_id** `string`
>
> Required if inline\_message\_id is not specified. Unique identifier for the target chat or username of the target channel
>
> **message\_id** `integer`
>
> Required if inline\_message\_id is not specified. Identifier of the message to edit
>
> **parse\_mode** `string`
>
> Mode for parsing entities in the message text. Options: 'Markdown', 'MarkdownV2', 'HTML'
>
> **reply\_markup** `string`
>
> JSON-serialized object for an inline keyboard
>
> **inline\_message\_id** `string`
>
> Required if chat\_id and message\_id are not specified. Identifier of the inline message
>
> **disable\_web\_page\_preview** `boolean`
>
> Disables link previews for links in this message
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Forward Message
>
> **Slug:** `TELEGRAM_FORWARD_MESSAGE`
>
> Forward a message from one chat to another. Service messages and messages with protected content cannot be forwarded.
>
> #### Input Parameters
>
> **chat\_id** `string` *required*
>
> Unique identifier for the target chat or username of the target channel
>
> **message\_id** `integer` *required*
>
> Message identifier in the chat specified in from\_chat\_id
>
> **from\_chat\_id** `string` *required*
>
> Unique identifier for the chat where the original message was sent (or channel username in the format @channelusername)
>
> **disable\_notification** `boolean`
>
> Sends the message silently. Users will receive a notification with no sound.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Get Chat Info
>
> **Slug:** `TELEGRAM_GET_CHAT`
>
> Get up to date information about the chat (current name of the user for one-on-one conversations, current username of a user, group or channel, etc.). The bot must be a member of or have access to the target chat; calls fail if the bot was never added, was removed, or is blocked.
>
> #### Input Parameters
>
> **chat\_id** `string` *required*
>
> Unique identifier for the target chat or username of the target supergroup or channel Numeric IDs for groups and channels are negative integers. Username must start with '@'; plain names without '@', full URLs, or free text will not resolve. Use TELEGRAM\_GET\_UPDATES to obtain reliable chat\_id values.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Get Chat Administrators
>
> **Slug:** `TELEGRAM_GET_CHAT_ADMINISTRATORS`
>
> Get a list of chat administrators, excluding other bots. On success, returns ChatMember objects, including the bot itself if it is an administrator.
>
> #### Input Parameters
>
> **chat\_id** `string` *required*
>
> Unique identifier for the target chat or username of the target supergroup or channel
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Get Chat History
>
> **Slug:** `TELEGRAM_GET_CHAT_HISTORY`
>
> Poll pending bot updates and filter the returned batch by chat ID or username; this is not complete chat history, and an empty filtered batch does not establish that the chat has no accessible messages. Polling requires no active webhook, and advancing the offset confirms earlier updates across chats.
>
> #### Input Parameters
>
> **limit** `integer`
>
> Limits the number of messages to be retrieved. Values between 1-100 are accepted. Defaults to 100. To paginate beyond 100 messages, use coordinated offset or message\_id values across sequential calls.
>
> **offset** `integer`
>
> Sequential number of the first message to be returned; negative values are allowed. Default is 0.
>
> **chat\_id** `string` *required*
>
> Unique identifier for the target chat or username of the target supergroup or channel. Results are filtered to only include updates from this specific chat.
>
> **message\_id** `integer`
>
> Identifier of a message in the chat as a starting point for getting history. If not specified, returns recent messages.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Get Chat Member
>
> **Slug:** `TELEGRAM_GET_CHAT_MEMBER`
>
> Get a chat member's status/role (including the bot itself) to preflight permissions and troubleshoot 403/empty-history issues. Use before sending messages to verify bot membership and permissions.
>
> #### Input Parameters
>
> **chat\_id** `string` *required*
>
> Unique identifier for the target chat or username of the target supergroup or channel (in the format @channelusername)
>
> **user\_id** `integer` *required*
>
> Unique identifier of the target user
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Get Chat Members Count
>
> **Slug:** `TELEGRAM_GET_CHAT_MEMBERS_COUNT`
>
> Get the number of members in a chat. The bot must be an administrator in the chat for this to work. Insufficient admin permissions surface as authorization errors, not as a zero or empty count.
>
> #### Input Parameters
>
> **chat\_id** `string` *required*
>
> Unique identifier for the target chat or username of the target supergroup or channel Usernames must be prefixed with '@'; plain chat names without '@' are invalid.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Get Bot Info
>
> **Slug:** `TELEGRAM_GET_ME`
>
> Get basic information about the bot using the Bot API getMe method, including its ID, name, username and available capability flags.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Get Updates
>
> **Slug:** `TELEGRAM_GET_UPDATES`
>
> Receive incoming bot updates using long polling; an outgoing webhook must be removed first, and offsets confirm earlier updates. Returned updates expose message, edited message, channel post, edited channel post and callback query fields, with limited message details.
>
> #### Input Parameters
>
> **limit** `integer`
>
> Limits the number of updates to be retrieved. Values between 1-100 are accepted. Defaults to 100
>
> **offset** `integer`
>
> Identifier of the first update to be returned. Must be greater by one than the highest among the identifiers of previously received updates
>
> **timeout** `integer`
>
> Timeout in seconds for long polling. Defaults to 0, i.e. usual short polling. Should be positive, short polling should be used for testing purposes only
>
> **allowed\_updates** `array`
>
> A JSON-serialized list of the update types you want your bot to receive. Specify an empty list to receive all update types except chat\_member
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Send Document
>
> **Slug:** `TELEGRAM_SEND_DOCUMENT`
>
> Send a general file to a Telegram chat using the Bot API. Telegram currently supports sending documents by URL only for PDF and ZIP files.
>
> #### Input Parameters
>
> **caption** `string`
>
> Document caption (may also be used when resending documents by file\_id), 0-1024 characters after entities parsing
>
> **chat\_id** `string` *required*
>
> Unique identifier for the target chat or username of the target channel
>
> **document** `string` *required*
>
> File to send. Pass a file\_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new file using multipart/form-data. More info on Sending Files: [https://core.telegram.org/bots/api#sending-files](https://core.telegram.org/bots/api#sending-files)
>
> **thumbnail** `string`
>
> Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side
>
> **parse\_mode** `string`
>
> Mode for parsing entities in the document caption. Options: 'Markdown', 'MarkdownV2', 'HTML'
>
> **reply\_markup** `string`
>
> JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user
>
> **reply\_to\_message\_id** `integer`
>
> If the message is a reply, ID of the original message
>
> **disable\_notification** `boolean`
>
> Sends the message silently. Users will receive a notification with no sound.
>
> **disable\_content\_type\_detection** `boolean`
>
> Disables automatic server-side content type detection for files uploaded using multipart/form-data
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Send Location
>
> **Slug:** `TELEGRAM_SEND_LOCATION`
>
> Send point on the map location to a Telegram chat using the Bot API.
>
> #### Input Parameters
>
> **chat\_id** `string` *required*
>
> Unique identifier for the target chat or username of the target channel
>
> **heading** `integer`
>
> For live locations, a direction in which the user is moving, in degrees. Must be between 1 and 360 if specified.
>
> **latitude** `number` *required*
>
> Latitude of the location
>
> **longitude** `number` *required*
>
> Longitude of the location
>
> **live\_period** `integer`
>
> Period in seconds for which the location will be updated (see Live Locations), should be between 60 and 86400
>
> **reply\_markup** `string`
>
> JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user
>
> **horizontal\_accuracy** `number`
>
> The radius of uncertainty for the location, measured in meters; 0-1500
>
> **reply\_to\_message\_id** `integer`
>
> If the message is a reply, ID of the original message
>
> **disable\_notification** `boolean`
>
> Sends the message silently. Users will receive a notification with no sound.
>
> **proximity\_alert\_radius** `integer`
>
> For live locations, a maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Send Message
>
> **Slug:** `TELEGRAM_SEND_MESSAGE`
>
> Send a text message to a Telegram chat using the Bot API. Sending is subject to Telegram's chat permissions and flood controls.
>
> #### Input Parameters
>
> **text** `string` *required*
>
> Text of the message to be sent, 1-4096 characters after entities parsing Content exceeding 4096 characters must be split across multiple calls.
>
> **chat\_id** `string` *required*
>
> Unique identifier for the target chat or username of the target channel (in the format @channelusername) Bots cannot initiate private chats with users who haven't messaged the bot first, and cannot message other bots. Verify accessibility via TELEGRAM\_GET\_UPDATES or TELEGRAM\_GET\_CHAT before sending.
>
> **parse\_mode** `string ("Markdown" | "MarkdownV2" | "HTML")`
>
> Mode for parsing entities in the message text. Accepted values: 'MarkdownV2', 'Markdown', 'HTML'. All special characters must be properly escaped; unescaped or unmatched characters return 400 'can't parse entities'. Use plain text (omit parse\_mode) if parsing fails.
>
> **reply\_markup** `string`
>
> JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.
>
> **reply\_to\_message\_id** `integer`
>
> If the message is a reply, ID of the original message
>
> **disable\_notification** `boolean`
>
> Sends the message silently. Users will receive a notification with no sound.
>
> **disable\_web\_page\_preview** `boolean`
>
> Disables link previews for links in this message
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Send Photo
>
> **Slug:** `TELEGRAM_SEND_PHOTO`
>
> Send a photo to a Telegram chat using the Bot API. Each call sends one photo rather than an album.
>
> #### Input Parameters
>
> **photo** `string` *required*
>
> Photo to send. Pass a file\_id as String to send a photo that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a photo from the Internet, or upload a new photo using multipart/form-data URL must be a publicly reachable HTTPS URL (no authentication, no expiring/signed links); non-reachable URLs return 400 'failed to get HTTP URL content'. Base64-encoded data and inline bytes are not accepted — extract a public URL from image-generating tools instead.
>
> **caption** `string`
>
> Photo caption (may also be used when resending photos by file\_id), 0-1024 characters after entities parsing
>
> **chat\_id** `string` *required*
>
> Unique identifier for the target chat or username of the target channel Derive from TELEGRAM\_GET\_CHAT or TELEGRAM\_GET\_UPDATES; unverified IDs return 400 'chat not found'.
>
> **parse\_mode** `string`
>
> Mode for parsing entities in the photo caption. Options: 'Markdown', 'MarkdownV2', 'HTML' Unmatched or unescaped special characters (e.g., `*`, `_`) trigger 400 'can't parse entities' — escape all special characters before sending.
>
> **reply\_markup** `string`
>
> JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user
>
> **reply\_to\_message\_id** `integer`
>
> If the message is a reply, ID of the original message
>
> **disable\_notification** `boolean`
>
> Sends the message silently. Users will receive a notification with no sound.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Send Poll
>
> **Slug:** `TELEGRAM_SEND_POLL`
>
> Send a native poll to a Telegram chat using the Bot API, with a question and answer options. On success, Telegram returns the sent message containing the poll.
>
> #### Input Parameters
>
> **type** `string ("regular" | "quiz")`
>
> Poll type, defaults to 'regular'.
>
> **chat\_id** `string` *required*
>
> Unique identifier for the target chat or username of the target channel
>
> **options** `array` *required*
>
> A list of answer options, 2-10 strings 1-100 characters each
>
> **question** `string` *required*
>
> Poll question, 1-300 characters
>
> **is\_closed** `boolean`
>
> Pass True, if the poll needs to be immediately closed. This can be useful for poll preview.
>
> **close\_date** `integer`
>
> Point in time (Unix timestamp) when the poll will be automatically closed. Must be at least 5 and no more than 600 seconds in the future. Can't be used together with open\_period.
>
> **explanation** `string`
>
> Text that is shown when a user chooses an incorrect answer or taps on the lamp icon in a quiz-style poll, 0-200 characters with at most 2 line feeds after entities parsing
>
> **open\_period** `integer`
>
> Amount of time in seconds the poll will be active after creation, 5-600. Can't be used together with close\_date.
>
> **is\_anonymous** `boolean`
>
> True, if the poll needs to be anonymous, defaults to True
>
> **reply\_markup** `string`
>
> JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user
>
> **correct\_option\_id** `integer`
>
> 0-based identifier of the correct answer option, required for polls in quiz mode
>
> **reply\_to\_message\_id** `integer`
>
> If the message is a reply, ID of the original message
>
> **disable\_notification** `boolean`
>
> Sends the message silently. Users will receive a notification with no sound.
>
> **explanation\_parse\_mode** `string ("Markdown" | "MarkdownV2" | "HTML")`
>
> Mode for parsing entities in the explanation.
>
> **allows\_multiple\_answers** `boolean`
>
> True, if the poll allows multiple answers, ignored for polls in quiz mode, defaults to False
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Set Bot Commands
>
> **Slug:** `TELEGRAM_SET_MY_COMMANDS`
>
> Use this method to change the list of the bot's commands. See [https://core.telegram.org/bots#commands](https://core.telegram.org/bots#commands) for more details about bot commands.
>
> #### Input Parameters
>
> **scope** `string`
>
> JSON-serialized object, describing scope of users for which the commands are relevant. Defaults to BotCommandScopeDefault. Scoped commands override the global default only for matching users/chats; omitting scope sets the global list.
>
> **commands** `array` *required*
>
> A list of bot commands to be set as the list of the bot's commands. At most 100 commands can be specified. Each command name must be 1–32 characters (lowercase letters and underscores only); each command description must be 1–256 characters.
>
> **language\_code** `string`
>
> A two-letter ISO 639-1 language code. If empty, commands will be applied to all users from the given scope, for whose language there are no dedicated commands
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not
