Link Search Menu Expand Document

Method: messages.requestMainWebView

Back to methods index

Open a Main Mini App.

Parameters:

NameTypeDescriptionRequired
compactBoolIf 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 Main Mini App link is equal to compact.Optional
fullscreenBoolIf 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 Main Mini App link is equal to fullscreen.Optional
peerUsername, chat ID, Update, Message or InputPeerCurrently open chat, may be inputPeerEmpty if no chat is currently open.Optional
botUsername, chat ID, Update, Message or InputUserBot that owns the main mini app.Optional
start_paramstringStart parameter, if opening from a Main Mini App link ».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->requestMainWebView(compact: $Bool, fullscreen: $Bool, peer: $InputPeer, bot: $InputUser, start_param: 'string', theme_params: $DataJSON, platform: 'string', );