Skip to main content
Kavenio publishes to Telegram through connected bots. Use telegram as the platform value in post payloads. Telegram supports two connection modes:
  • managed bot connections, where Kavenio owns the bot credential and the customer connects a channel or group by chat ID or access code
  • bring-your-own bot-token connections, where the customer supplies a Telegram bot token and optional chat ID
  • managed Business connections, where a Telegram user grants the Kavenio bot permission to publish Stories on their profile

Quick Reference

Connect

Use managed connect when customers should not handle bot credentials. The direct form connects an already-known Telegram chat ID:
Managed direct connect verifies the Kavenio bot credential, looks up the target chat, checks that the bot is an administrator, and stores the connected account with the chat metadata returned by Telegram. For self-serve setup, create an access code:
Kavenio returns a short-lived code, expiration, bot username when configured, and instructions. The customer adds the Kavenio bot as an administrator in the target channel or group, then sends the code to the bot with the channel username or posts the code in the target chat. Poll the code endpoint until the status is connected, pending, or expired. Use BYO bot-token connect when the customer owns the Telegram bot credential:
The bot token is accepted only when connecting the account, stored encrypted, and never returned by the API.

Connect A Telegram Business Profile

Start an automatic pairing session:
The response includes an expiring botUrl. Open it and press Start. The bot then asks the Telegram user to open Settings > Chat Automation, add @kavenio_bot, and enable Manage Stories. Kavenio matches the Telegram user from the private Start message to the later Business connection and completes the account automatically. Poll the organization-scoped session until it reaches connected:
Telegram requires the user-controlled Chat Automation permission screen. The pairing link expires after 24 hours, is single-use, and is stored by Kavenio only as a SHA-256 digest.

Fallback claim code

If a user connects the bot without starting a pairing link, Kavenio sends an eight-character recovery code. Claim it with:
The fallback code also expires after 24 hours. The API never returns the Telegram Business connection ID or bot token.

Create A Post

Create a Telegram post through the shared posts API:
By default, Kavenio sends the post to the connected account’s stored chat ID. Set platformSpecificData.chatId only when the connected bot is allowed to post to another Telegram chat.

Platform Options

Telegram-specific options live under platformSpecificData:
Supported options:

Profile Stories

Use the same Posts API with contentType: "story" on a claimed Telegram Business account. The agent supplies the public image or video URL; Kavenio downloads it with outbound-URL and size checks, then uploads a fresh file to Telegram as required by the Bot API.
Story-specific options: Stories require exactly one image or video. Captions are limited to 2,048 characters. Photos must be 1080x1920 and no larger than 10 MB. Videos must be 720x1280, no longer than 60 seconds, and no larger than 30 MB. The managed Bot API publishes Business profile Stories with Everyone visibility; contacts and other Telegram users can see them subject to Telegram’s normal Story surfaces. Telegram account eligibility and Story quotas remain provider-enforced.

Media

Add mediaItems for images, videos, documents, or media groups. Kavenio validates the public media URL and either passes it to Telegram by URL or uploads it as multipart form data when the item requires upload.
Telegram captions use the post content. For multi-item media groups, the caption is attached to the first media item.

Edit And Delete

Kavenio can edit text and captions for Kavenio-published Telegram message targets, edit Kavenio-published Business Stories, and delete both through the shared post target APIs. Telegram requires Story media on edit, so Kavenio reuploads the source media recorded when the Story was published. Telegram edit behavior depends on the message type and Telegram provider rules. If Telegram reports that the message is already unchanged or already deleted, Kavenio treats the operation as idempotent.

Command Menus

Telegram command menus are account scoped:
Command names must be unique and can contain lowercase letters, numbers, and underscores. Telegram allows up to 100 commands and command descriptions up to 256 characters. Managed accounts use a chat-scoped command menu for the connected chat. BYO bot-token accounts use the bot’s default command menu. The CLI exposes the same surface:

Direct Messages

Kavenio exposes account-scoped Telegram inbox APIs for managed Telegram accounts:
Conversation listing accepts limit and includeArchived. Message listing accepts limit. Sending a message accepts text, media, or both:
Telegram conversations also appear in the shared engagement inbox:
Shared inbox rows use itemType: "telegram_conversation". Kavenio does not invent Telegram read state, so Telegram conversation rows are not returned by unreadOnly=true. Kavenio creates the first persisted conversation when a private Telegram user redeems a managed access code. Later inbound private messages are stored only when the provider chat maps to exactly one existing conversation; ambiguous private chats are ignored instead of guessed. BYO bot-token accounts return an unsupported-provider error for Telegram DM APIs. Read receipts, typing indicators, and arbitrary Telegram Bot API proxying are not supported. The CLI exposes the same managed-inbox surface:
Pass --include-archived to include archived conversations. Pass --archived false to unarchive a conversation.

Operational Notes

Telegram managed connect and managed inbox depend on Kavenio’s configured Telegram bot and inbound-update worker. The bot must remain an administrator in each connected channel or group. If a channel migrates to a supergroup, Kavenio records Telegram’s migrated chat ID when Telegram returns it during publishing. For production operations, monitor polling and update-ingestion health, account health, command-menu errors, access-code rate limits, and publish failures. Managed bot tokens are stored in server-side platform credentials or deployment configuration. The update-ingestion secret is deployment-level configuration; raw secrets are never exposed through public account responses.

Unsupported

Kavenio does not support Telegram polls, quizzes, analytics, message pinning, chat administration, invite link management, inline keyboard workflows, DM read receipts, typing indicators, or arbitrary Bot API proxy routes.