Method: messages.sendWebViewData
Used by the user to relay data from an opened reply keyboard bot mini app to the bot that owns it.
Parameters:
Name | Type | Description | Required |
---|---|---|---|
bot | Username, chat ID, Update, Message or InputUser | Bot that owns the web app | Optional |
button_text | string | Text of the keyboardButtonSimpleWebView that was pressed to open the web app. | Optional |
data | string | Data 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', );