Link Search Menu Expand Document

Method: bots.invokeWebViewCustomMethod

Back to methods index

Send a custom request from a mini bot app, triggered by a web_app_invoke_custom_method event ».

The response should be sent using a custom_method_invoked event, see here » for more info on the flow.

Parameters:

NameTypeDescriptionRequired
botUsername, chat ID, Update, Message or InputUserIdentifier of the bot associated to the mini bot appOptional
custom_methodstringIdentifier of the custom method to invokeOptional
paramsDataJSONMethod parametersYes

Return type: DataJSON

Can userbots use this method: YES

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

$DataJSON = $MadelineProto->bots->invokeWebViewCustomMethod(bot: $InputUser, custom_method: 'string', params: $DataJSON, );