Method: messages.requestAppWebView
Open a bot mini app from a direct Mini App deep link, sending over user information after user confirmation.
After calling this method, until the user closes the webview, messages.prolongWebView must be called every 60 seconds.
Parameters:
Name | Type | Description | Required |
---|---|---|---|
write_allowed | Bool | Set 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. | Optional |
compact | Bool | Optional | |
fullscreen | Bool | Optional | |
peer | Username, chat ID, Update, Message or InputPeer | If 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. | Optional |
app | InputBotApp | The app obtained by invoking messages.getBotApp as specified in the direct Mini App deep link docs. | Yes |
start_param | string | If the startapp query string parameter is present in the direct Mini App deep link, pass it to start_param . | 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 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->requestAppWebView(write_allowed: $Bool, compact: $Bool, fullscreen: $Bool, peer: $InputPeer, app: $InputBotApp, start_param: 'string', theme_params: $DataJSON, platform: 'string', );