openMiniApp
Open a mini app. USER-ONLY CACHE
Parameters
The identifier of a bot with the mini app.
The identifier of the chat from which the mini app is opened.
The mode to open the mini app in. Defaults to the default mode.
url?: string
The URL of the mini app to open.
startParameter?: string
The start parameter to pass to the mini app.
themeParameters?: string
Theme parameters encoded in JSON.
disableNotification?: boolean
Whether messages relevant to the mini app session should be sent silently.
The identifier of a chat to send relevant messages on behalf of.
fromMenu?: boolean
Whether the mini app is being opened from the menu.
Information on a message to which relevant messages should be replied to.
Result
Syntax
// Required parameters only.
await client.openMiniApp(botId, chatId);
// Required parameters + optional parameters.
// Any of the optional parameters can be omitted.
await client.openMiniApp(botId, chatId, {
mode,
url,
startParameter,
themeParameters,
disableNotification,
sendAs,
fromMenu,
replyTo,
});