Method: bots.invokeWebViewCustomMethod
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:
Name | Type | Description | Required |
---|---|---|---|
bot | Username, chat ID, Update, Message or InputUser | Identifier of the bot associated to the mini bot app | Optional |
custom_method | string | Identifier of the custom method to invoke | Optional |
params | DataJSON | Method parameters | Yes |
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, );