Telegram
API actions for the Telegram integration.
Telegram
Send Telegram messages, manage chat pins, and generate invite links.
Create an invite link
Generate a new join link for a chat.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
chat_id | string | Yes | Chat ID. |
name | string | No | Invite link label. |
expire_date | number | No | Expiration Unix timestamp. |
member_limit | number | No | Maximum users. |
Response
{
"expire_date": 1706745600,
"invite_link": "https://t.me/+abcdef123456",
"member_limit": 100,
"status": "success"
}Forward a message
Forward a message from one chat to another.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
chat_id | string | Yes | Destination chat ID. |
from_chat_id | string | Yes | Source chat ID. |
message_id | number | Yes | Message ID to forward. |
Response
{
"chat_id": 123456789,
"message_id": 12347,
"status": "success"
}Get chat member count
Retrieve the number of members in a chat.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
chat_id | string | Yes | Chat ID. |
Response
{
"count": 147,
"status": "success"
}Pin a chat message
Pin a message in a chat with optional silent notification.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
chat_id | string | Yes | Chat ID. |
message_id | number | Yes | Message ID to pin. |
disable_notification | boolean | No | Disable notification. |
Response
{
"status": "success"
}Send a message
Send a text message to a chat using a bot token.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
chat_id | string | Yes | Target chat ID or username. |
text | string | Yes | Message text. |
parse_mode | string | No | Parse mode. |
Response
{
"chat_id": 987654321,
"message_id": 12345,
"status": "success"
}Send a photo
Send a photo to a chat with an optional caption.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
chat_id | string | Yes | Target chat ID or username. |
photo_url | string | Yes | Photo URL. |
caption | string | No | Photo caption. |
Response
{
"chat_id": 987654321,
"message_id": 12346,
"status": "success"
}