Method: messages.requestAppWebView
Open a bot web app from a named bot web 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 named bot web app deep link docs, and the user agreed. | 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 named bot web app deep link docs. | Yes |
start_param | string | If the startapp query string parameter is present in the named bot web 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 | Yes |
Return type: AppWebViewResult
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();
$AppWebViewResult = $MadelineProto->messages->requestAppWebView(write_allowed: $Bool, peer: $InputPeer, app: $InputBotApp, start_param: 'string', theme_params: $DataJSON, platform: 'string', );