Developer documentation

Telegram Bot commands, buttons, menus and profile

Distinguish command menus and message buttons, handle callbacks, refresh profiles and preserve bot-management permissions.

GetTGAPI editorial teamUpdated
Documentation notesReviewed

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

On this page
  1. Design three distinct entry points
  2. Keep presentation separate from identity
  3. Managed bots add another authorization chain
  4. Implementation recommendations

Design three distinct entry points

Commands, the input-side menu and message buttons are different controls. Reply keyboards change input choices; inline keyboards can send callbacks; menus may open Mini Apps. Match them to conversation state and reject obsolete buttons.

Acknowledge callbacks promptly even when no popup text is needed. Report slow business progress separately instead of leaving the client spinner running.

Keep presentation separate from identity

Names, descriptions and avatars can change and be localized. Refresh cached profiles, but use stable identity rather than names as database keys. MTProto and Bot API ID representations require type-aware conversion.

Managed bots add another authorization chain

Managed bots distinguish the owner and manager bot. Creation, access controls and token export are not ordinary customer actions. Available methods do not bypass ownership authorization.

Implementation recommendations

Version menu configuration with routing and verify it after publication. Partition conversations, tokens and orders by bot. Removing a bot should remove its service and menu bindings while retaining necessary sanitized audit evidence.