# Telegram

> Interact with Telegram chats, manage messages, and send media through the Telegram Bot API.

Source: https://cotera.co/docs/reference/tools/individual-tools/telegram

---

**Authentication Type:** API Key\
**Description:** Interact with Telegram chats, manage messages, and send media through the Telegram Bot API.

***

## Beta Notice

**This tool is currently in beta testing and not yet available for general use.**

To get the Telegram tool added to your Cotera workspace, please contact our support team at [support.cotera.co](https://support.cotera.co).

***

## Authentication

To authenticate, you'll need a Telegram Bot Token. Learn how to create a bot and get your token in the [Telegram Bot API documentation](https://core.telegram.org/bots/api).

***

## Chat Information

Retrieve information about Telegram chats and their members.

### Get Chat

Get up-to-date information about a specific chat, including chat type, title, description, and member count.

**Operation Type:** Query (Read)

### Get Chat Administrators

Retrieve a list of administrators in a chat, including their user information, status, and permissions.

**Operation Type:** Query (Read)

### Get Chat Member

Get detailed information about a specific member of a chat, including their status, permissions, and user details.

**Operation Type:** Query (Read)

## Chat Management

Manage your bot's participation in chats.

### Leave Chat

Remove your bot from a group, supergroup, or channel.

**Operation Type:** Mutation (Write)

## Messages

Send, edit, and manage messages in Telegram chats.

### Get Messages

Retrieve messages from a Telegram chat, including text content, sender information, and timestamps.

**Operation Type:** Query (Read)

**Parameters:**

* **chatId** `string` (required): The chat ID to retrieve messages from
* **limit** `number` (nullable): Maximum number of messages to return

**Returns:**

* **messages** `array of objects`: Array of messages
  * **messageId** `number`: Message identifier
  * **text** `string` (nullable): Message text content
  * **date** `number`: Message timestamp (Unix)
  * **from** `object` (nullable): Sender information
    * **id** `number`: User ID
    * **firstName** `string` (nullable): First name
    * **lastName** `string` (nullable): Last name
    * **username** `string` (nullable): Username

**Example Usage:**

```json
{
  "chatId": "-1001234567890",
  "limit": 50
}
```

### Send Message

Send a text message to a chat with support for formatting, reply options, and inline keyboards.

**Operation Type:** Mutation (Write)

### Send Photo

Send a photo to a chat with optional caption and formatting options.

**Operation Type:** Mutation (Write)

### Send Sticker

Send a sticker from Telegram's sticker library to a chat.

**Operation Type:** Mutation (Write)

### Delete Message

Remove a previously sent message from a chat.

**Operation Type:** Mutation (Write)

### Edit Message Text

Modify the text content of a previously sent message, including formatting and inline keyboards.

**Operation Type:** Mutation (Write)

