Link Search Menu Expand Document

Method: messages.requestSimpleWebView

Back to methods index

Open a bot mini app.

Parameters:

NameTypeDescriptionRequired
from_switch_webviewBoolWhether the webapp was opened by clicking on the switch_webview button shown on top of the inline results list returned by messages.getInlineBotResults.Optional
from_side_menuBoolSet this flag if opening the Mini App from the installed side menu entry ».Optional
compactBoolDeprecated.Optional
fullscreenBoolRequests to open the app in fullscreen mode.Optional
botUsername, chat ID, Update, Message or InputUserBot that owns the mini appOptional
urlstringWeb app URL, if opening from a keyboard button or inline resultOptional
start_paramstringDeprecated.Optional
theme_paramsDataJSONTheme parameters »Optional
platformstringShort name of the application; 0-64 English letters, digits, and underscoresOptional

Return type: WebViewResult

Can userbots use this method: YES

Can bots use this method: NO

MadelineProto Example (now async for huge speed and parallelism!):

if (!file_exists('madeline.php')) {
    copy('https://phar.madelineproto.xyz/madeline.php', 'madeline.php');
}
include 'madeline.php';

$MadelineProto = new \danog\MadelineProto\API('session.madeline');
$MadelineProto->start();

$WebViewResult = $MadelineProto->messages->requestSimpleWebView(from_switch_webview: $Bool, from_side_menu: $Bool, compact: $Bool, fullscreen: $Bool, bot: $InputUser, url: 'string', start_param: 'string', theme_params: $DataJSON, platform: 'string', );