Do not mix the identifiers. miniapp_id is a signed business id generated by MPChat; shortName is a per-bot link name; entryUrl is the page users open. They play different roles.
Overview
An MPChat MiniApp is a web app opened inside MPChat. The current phase focuses on opening the MiniApp, exposing signed init data, and letting your backend verify user identity. It does not implement the full WebApp JavaScript API.
Core identifiers
Name | Source | Purpose |
miniapp_id | Generated by MPChat when you create the MiniApp (looks like | Business id; appears in the signed |
shortName | The short link name you set at creation. | Combines with the bot username to form a direct link. Unique under one bot. |
entryUrl | The H5 entry URL you set at creation. | The page users open; used as |
botUsername | The bot username. | First path segment of a direct link. |
Direct link rules
https://mp.net/{botUsername}/{shortName}Do not include
@in the path.shortNameis unique under the same bot; different bots may reuse the same name.Passing only
botUsernameresolves the bot but selects no default MiniApp — includeshortName.
How creation and opening connect
Create the MiniApp (for example via BotFather
/newapp); recordminiapp_id,shortName,entryUrl.Open via a sendMessage
web_appbutton or a direct link.When opened, MPChat generates a signed launch context; the backend confirms which MiniApp the request belongs to using the signed
miniapp_id.
shortName is not a miniapp id
Developers often call
shortNamea “miniappid”. That is wrong.miniapp_id(looks likema_…) is the platform-issued business id inside signedinitData.shortNameis the human slug you choose at creation; it pairs withbotUsernamein the direct link.Passing only
botUsernamenever selects a default MiniApp — always includeshortName.
Direct link and startapp
https://mp.net/{botUsername}/{shortName}
https://mp.net/{botUsername}/{shortName}?startapp=report_0528MPChat includes the launch value as
start_paramin the signedinitDataquery string.For direct-link page routing, the frontend can read
window.MpChat.WebApp.initDataUnsafe.startParam. Use the verifiedstart_paramon the server for decisions that affect permissions or business state.Use the
https://mp.net/{botUsername}/{shortName}?startapp=…form for parameterized direct links and message buttons. Keep the registeredentryUrlas the page URL.In BotFather,
shortNameis case-sensitive and unique per bot. Use 3–30 ASCII letters, digits, or underscores (^[a-zA-Z0-9_]{3,30}$).
Related
miniapp_id is not a frontend-defined page id and is not the same as shortName. Always trust the signed value in raw initData, never an unsigned one from the frontend.
