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.


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

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