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_to_msg_idintWhether 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 this message ID.Optional
top_msg_idintThis field must contain the topic ID only when replying to messages in forum topics different from the “General” topic (i.e. reply_to_msg_id is set and reply_to_msg_id != topicID and topicID != 1).
If the replied-to message is deleted before the method finishes execution, the value in this field will be used to send the message to the correct topic, instead of the “General” topic.
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_msg_id: int, top_msg_id: int, send_as: InputPeer, );