Method: messages.requestMainWebView
Open a Main Mini App.
Parameters:
Name | Type | Description | Required |
---|---|---|---|
compact | Bool | If 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 |
fullscreen | Bool | If 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 |
peer | Username, chat ID, Update, Message or InputPeer | Currently open chat, may be inputPeerEmpty if no chat is currently open. | Optional |
bot | Username, chat ID, Update, Message or InputUser | Bot that owns the main mini app. | Optional |
start_param | string | Start parameter, if opening from a Main Mini App link ». | Optional |
theme_params | DataJSON | Theme parameters » | Optional |
platform | string | Short name of the application; 0-64 English letters, digits, and underscores | Optional |
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', );