Link Search Menu Expand Document

Method: messages.sendWebViewData

Back to methods index

Used by the user to relay data from an opened reply keyboard bot mini app to the bot that owns it.

Parameters:

NameTypeDescriptionRequired
botUsername, chat ID, Update, Message or InputUserBot that owns the web appOptional
button_textstringText of the keyboardButtonSimpleWebView that was pressed to open the web app.Optional
datastringData to relay to the bot, obtained from a web_app_data_send JS event.Optional

Return type: Updates

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();

$Updates = $MadelineProto->messages->sendWebViewData(bot: $InputUser, button_text: 'string', data: 'string', );