Skip to main content

MPChat Bot overview: how it works and what it supports

Understand what an MPChat bot is, how messages flow in and out, which Bot API categories are supported, and the phase-one limits before you start building.

In short: An MPChat bot is an MPChat account controlled by your backend through the Bot API. It can send messages into existing conversations, receive user and group events, and open MiniApps — but it cannot start a conversation from nothing, and a subset of Telegram-style methods are not available yet.


Overview

This page gives you the mental model before you write any code. A bot uses a secret bot token to call the Bot API on a single predictable path shape:

https://call.mp.net/bot/bot{MPCHAT_BOT_TOKEN}/{methodName}

The API supports both the URL token shown above and Authorization: Bearer <token> with token-free API paths. Bearer takes precedence if both are supplied. See the authentication guide for the recommended format. Never expose your token in frontend code, shared screenshots, or logs.

What a bot can do

  • Send text and media messages into conversations the bot already has context for.

  • Receive incoming user/group events (Updates) by polling or webhook.

  • Read chat and member metadata, manage messages (edit/pin/forward/copy/recall), and manage its command menu.

  • Open a MiniApp from a message button and let your backend verify the signed user identity.

Data flow

Every integration is the same two-way loop:

  • Inbound: user message → Update → your getUpdates loop or webhook handler.

  • Outbound: parse chat_id → sendMessage with reply_markup (inline buttons: url / web_app / callback_data / copy_text; or a Reply Keyboard). Optionally set the left-side menu via setChatMenuButton.

What is supported

Browse the method matrix to find methods across the ten official categories, including Bot Profile, Bot Menu, and MediaUpload.

What is NOT supported yet

  • Bots cannot start conversations. A user or chat must establish context first, then the bot can reply.

  • Some methods return HTTP 501 (currently sendChatAction, sendLocation, sendPoll).

  • file_id reuse is not supported — send media via a public URL or multipart upload.

  • MiniApp client return flows are limited (web_app_data / sendData / answerWebAppQuery are not available). Message-button callbacks (callback_query → answerCallbackQuery) are a separate, supported path.

Where to go next

Related

The supported method set and MP differences may change. The parameter-level source of truth is always core.mp.net/bots.

Did this answer your question?