mirror of
https://github.com/danog/MadelineProtoDocs.git
synced 2024-11-26 20:35:03 +01:00
1.9 KiB
1.9 KiB
title | description | grand_parent | parent | image | redirect_from |
---|---|---|---|---|---|
messages.getBotCallbackAnswer | Press an inline callback button and get a callback answer from the bot | Telegram RPC API | Methods | https://docs.madelineproto.xyz/favicons/android-chrome-256x256.png | /API_docs/methods/messages_getBotCallbackAnswer.html |
Method: messages.getBotCallbackAnswer
Press an inline callback button and get a callback answer from the bot
Parameters:
Name | Type | Description | Required |
---|---|---|---|
game | Bool | Whether this is a "play game" button | Optional |
peer | Username, chat ID, Update, Message or InputPeer | Where was the inline keyboard sent | Optional |
msg_id | int | ID of the Message with the inline keyboard | Optional |
data | bytes | Callback data | Optional |
password | InputCheckPasswordSRP | For buttons requiring you to verify your identity with your 2FA password, the SRP payload generated using SRP. | Optional |
Return type: messages.BotCallbackAnswer
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, );