Telegram
pepe.business manages Telegram bots (channels, groups, broadcasts).
Connection
You must first create a bot via @BotFather, then connect the token:
POST /v1/connect/telegram
{ "botToken": "123456:ABC-DEF..." }
pepe.business verifies the token and automatically configures the webhook.
Send a message
To a user
POST /v1/messages
{
"platform": "telegram",
"to": "123456789", // chat_id
"text": "Hello!"
}
To a channel
POST /v1/messages
{
"platform": "telegram",
"to": "@mychannel",
"text": "Important announcement"
}
Bot commands
PUT /v1/telegram/bot-commands
{
"commands": [
{ "command": "start", "description": "Start" },
{ "command": "help", "description": "Help" },
{ "command": "status", "description": "Order status" }
]
}
Inline keyboards
POST /v1/messages
{
"platform": "telegram",
"to": "123456789",
"text": "Choose an option:",
"telegramOptions": {
"inlineKeyboard": [
[
{ "text": "Yes", "callbackData": "yes" },
{ "text": "No", "callbackData": "no" }
]
]
}
}
Groups
- Add the bot to a group: manual by the user
- Retrieve messages: via the
inbox.message.receivedwebhook - Moderation: delete messages via
DELETE /v1/telegram/messages/{messageId}
Broadcasts
POST /v1/broadcasts
{
"platform": "telegram",
"text": "Weekly newsletter",
"recipients": ["123", "456", "789"]
}
Limits
- 30 messages/second per bot
- 1 message per chat / second
- Markdown supported (V1 and V2)
- Media: 50 MB photo, 20 MB audio, 50 MB video