telegram api method · layer 229 · #53618bce

messages.requestAppWebView

usable by users

Open a bot mini app from a direct Mini App deep link, sending over user information after user confirmation.

definition

messages.requestAppWebView#53618bce flags:# write_allowed:flags.0?true compact:flags.7?true fullscreen:flags.8?true peer:InputPeer app:InputBotApp start_param:flags.1?string theme_params:flags.2?DataJSON platform:string = WebViewResult;

parameters

nametypedescription
flags#Flags, see TL conditional fields
write_allowedflags.0?trueSet this flag if the bot is asking permission to send messages to the user as specified in the direct Mini App deep link docs, and the user agreed.
compactflags.7?trueIf set, requests to open the mini app in compact mode (as opposed to normal or fullscreen mode). Must be set if the mode parameter of the direct Mini App deep link is equal to compact.
fullscreenflags.8?trueIf set, requests to open the mini app in fullscreen mode (as opposed to compact or normal mode). Must be set if the mode parameter of the direct Mini App deep link is equal to fullscreen.
peerInputPeerIf the client has clicked on the link in a Telegram chat, pass the chat's peer information; otherwise pass the bot's peer information, instead.
appInputBotAppThe app obtained by invoking messages.getBotApp as specified in the direct Mini App deep link docs.
start_paramflags.1?stringIf the startapp query string parameter is present in the direct Mini App deep link, pass it to start_param.
theme_paramsflags.2?DataJSONTheme parameters »
platformstringShort name of the application; 0-64 English letters, digits, and underscores

returns

WebViewResult

errors (7)

codeerrordescription
400BOT_APP_BOT_INVALIDThe bot_id passed in the inputBotAppShortName constructor is invalid.
400BOT_APP_INVALIDThe specified bot app is invalid.
400BOT_APP_SHORTNAME_INVALIDThe specified bot app short name is invalid.
400BUSINESS_CONNECTION_NOT_ALLOWEDThis method was invoked over a business connection using invokeWithBusinessConnection, but either (1) we're a user, and users cannot invoke methods over a business connection; (2) we're a bot, but business mode was disabled in @botfather or (3); we're a bot, but this method cannot be invoked over a business connection.
400MSG_ID_INVALIDInvalid message ID provided.
400THEME_PARAMS_INVALIDThe specified theme_params field is invalid.
401AUTH_KEY_UNREGISTEREDThe specified authorization key is not registered in the system (for example, a PFS temporary key has expired).

history

present in layers 154–229 · constructor id changed 1×

idlayers
#8c5a3b3c154–182
#53618bce183–229