Skip to main content

MiniApp overview and core identifiers: miniapp_id, shortName, entryUrl, direct links

What an MPChat MiniApp is and how identifiers fit: miniapp_id vs shortName, entryUrl, botUsername, direct links, and ?startapp= → start_param.

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 ma_...).

Business id; appears in the signed initData.miniapp_id. Verify it on the backend.

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 web_app.url in sendMessage.

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.

  • shortName is unique under the same bot; different bots may reuse the same name.

  • Passing only botUsername resolves the bot but selects no default MiniApp — include shortName.

  • A launch parameter is delivered in signed initData.start_param; the frontend reads initDataUnsafe.startParam for routing.

How creation and opening connect

  • Create the MiniApp (for example via BotFather /newapp); record miniapp_id, shortName, entryUrl.

  • Open via a sendMessage web_app button 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 shortName a “miniappid”. That is wrong.

  • miniapp_id (looks like ma_…) is the platform-issued business id inside signed initData.

  • shortName is the human slug you choose at creation; it pairs with botUsername in the direct link.

  • Passing only botUsername never selects a default MiniApp — always include shortName.

Direct link and startapp

https://mp.net/{botUsername}/{shortName}
https://mp.net/{botUsername}/{shortName}?startapp=report_0528

  • The startapp query value is delivered as signed initData.start_param.

  • On the frontend, read initDataUnsafe.startParam (and tgWebAppStartParam if the client injects it) for routing.

  • A web_app.url on a message button may carry the same query; do not bake startapp into the saved MiniApp entryUrl.

  • Naming tip: prefer lowercase letters, digits, and underscores for shortName; uniqueness is per bot. Exact length limits follow BotFather / official docs.

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.

Did this answer your question?