Link Search Menu Expand Document

Method: messages.getBotCallbackAnswer

Back to methods index

Press an inline callback button and get a callback answer from the bot

Parameters:

NameTypeDescriptionRequired
gameBoolWhether this is a “play game” buttonOptional
peerUsername, chat ID, Update, Message or InputPeerWhere was the inline keyboard sentOptional
msg_idintID of the Message with the inline keyboardOptional
databytesCallback dataOptional
passwordInputCheckPasswordSRPFor buttons requiring you to verify your identity with your 2FA password, the SRP payload generated using SRP.Optional

Return type: messages.BotCallbackAnswer

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

$messages_BotCallbackAnswer = $MadelineProto->messages->getBotCallbackAnswer(game: $Bool, peer: $InputPeer, msg_id: $int, data: 'bytes', password: $InputCheckPasswordSRP, );