Link Search Menu Expand Document

Method: messages.prolongWebView

Back to methods index

Indicate to the server (from the user side) that the user is still using a web app.

If the method returns a QUERY_ID_INVALID error, the webview must be closed.

Parameters:

NameTypeDescriptionRequired
silentBoolWhether the inline message that will be sent by the bot on behalf of the user once the web app interaction is terminated should be sent silently (no notifications for the receivers).Optional
peerUsername, chat ID, Update, Message or InputPeerDialog where the web app was opened.Optional
botUsername, chat ID, Update, Message or InputUserBot that owns the web appOptional
query_idlongWeb app interaction ID obtained from messages.requestWebViewYes
reply_toInputReplyToIf set, indicates that the inline message that will be sent by the bot on behalf of the user once the web app interaction is terminated should be sent in reply to the specified message or story.Optional
send_asUsername, chat ID, Update, Message or InputPeerOpen the web app as the specified peerOptional

Return type: Bool

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

$Bool = $MadelineProto->messages->prolongWebView(silent: $Bool, peer: $InputPeer, bot: $InputUser, query_id: $long, reply_to: $InputReplyTo, send_as: $InputPeer, );