Developer documentation

Telegram AI bots, guest mode and bot-to-bot communication

Understand streaming drafts, guest bots and bot-to-bot eligibility while preventing duplicate replies and loops.

GetTGAPI editorial teamUpdated
Documentation notesReviewed

Based on official sources and independently maintained by GetTGAPI. Documentation and glossary →

On this page
  1. Separate streaming drafts from final messages
  2. Guest bots are not ordinary members
  3. Bot-to-bot communication has explicit eligibility
  4. Implementation recommendations

Separate streaming drafts from final messages

Live drafts are identified by chat, topic and draft ID. They can change and expire. Replace the temporary display when the final message arrives rather than persisting every increment as a permanent message. Client support may vary.

Guest bots are not ordinary members

Guest mode invokes a bot by mention in supported contexts, supplying a query and permitted context. Restrictions still apply, including protected or secret-chat cases. This differs from users selecting inline results themselves.

Bot-to-bot communication has explicit eligibility

Private chats, groups and Business connections have different enabling conditions. Neither “bots never receive bot messages” nor “all bots can message each other” is a safe universal assumption.

Implementation recommendations

Bound interaction depth, lifetime and sender-pair rate, with deduplication. Distinguish human actions from automatic replies and stop immediate echo loops. Sensitive operations still need server authorization; natural-language instructions from another bot are not sufficient authority.