In short
Inline keyboards ride on the message bubble via sendMessage reply_markup.inline_keyboard. Four button kinds: url, web_app, callback_data, and copy_text. They are not configured in BotFather.
Overview
Use an Inline Keyboard when actions should stay attached to a message. For a bottom input keyboard, see the Reply Keyboard guide. Parameter truth: core.mp.net/bots.
Buttons travel with the message
You attach buttons only through message
reply_markup(typicallysendMessage).BotFather Menu Button / description settings do not create inline rows on chat bubbles.
Editing later uses
editMessageReplyMarkup(see the callback guide).
Four button kinds
Field | Behavior |
| Opens an HTTP/HTTPS link in the client browser / in-app browser. |
| Opens an enabled MiniApp owned by this bot ( |
| Sends a |
| Object form |
Layout limits
Buttons in the same row share equal width (independent of label length).
Typical row gap ≈ 2pt (client layout).
At most 8 buttons per row; at most 100 buttons per keyboard.
Button
textmax length 64; longer labels are truncated.
style colors
Optional style on each InlineKeyboardButton: success (green), danger (red), primary (blue). Omit it for the client default. Other Telegram-only button fields return 400.
Trailing icons
The client picks the trailing icon from the button kind (MiniApp / URL / copy / navigate). You do not pass an icon URL.
Minimal JSON (one of each)
{
"chat_id": 12345,
"text": "Choose",
"reply_markup": {
"inline_keyboard": [[
{ "text": "Docs", "url": "https://core.mp.net/bots" },
{ "text": "App", "web_app": {
"url": "https://mp.net/MyBot/shop?startapp=home" } },
{ "text": "OK", "callback_data": "ok:1", "style": "success" },
{ "text": "Copy", "copy_text": { "text": "ORDER-42" } }
]]
}
}
Related
Callback buttons and in-place updates (answerCallbackQuery)
Core message methods: sendMessage reply_markup
MiniApp identifiers, direct links, and startapp
