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.


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('', 'madeline.php');
include 'madeline.php';

$MadelineProto = new \danog\MadelineProto\API('session.madeline');

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