messages.getBotCallbackAnswer #

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

Layer 223

messages.botCallbackAnswer#36585ea4 flags:# alert:flags.1?true has_url:flags.3?true native_ui:flags.4?true message:flags.0?string url:flags.2?string cache_time:int = messages.BotCallbackAnswer;
---functions---
messages.getBotCallbackAnswer#9342ca07 flags:# game:flags.1?true peer:InputPeer msg_id:int data:flags.0?bytes password:flags.2?InputCheckPasswordSRP = messages.BotCallbackAnswer;

Parameters #

NameTypeDescription
flags#Flags, see TL conditional fields
gameflags.1?trueWhether this is a "play game" button
peerInputPeerWhere was the inline keyboard sent
msg_idintID of the Message with the inline keyboard
dataflags.0?bytesCallback data
passwordflags.2?InputCheckPasswordSRPFor buttons requiring you to verify your identity with your 2FA password, the SRP payload generated using SRP.

Result #

messages.BotCallbackAnswer

Only users can use this method #

Possible errors #

CodeTypeDescription
400BOT_RESPONSE_TIMEOUTA timeout occurred while fetching data from the bot.
400CHANNEL_INVALIDThe provided channel is invalid.
400CHANNEL_PRIVATEYou haven't joined this channel/supergroup.
400DATA_INVALIDEncrypted data invalid.
400MESSAGE_ID_INVALIDThe provided message id is invalid.
400MSG_ID_INVALIDInvalid message ID provided.
400PASSWORD_MISSINGYou must enable 2FA before executing this operation.
400PEER_ID_INVALIDThe provided peer id is invalid.
-503TimeoutTimeout while fetching data.

keyboardButtonCallback #

Callback button

Available only in inline keyboards.

When pressed, clients send data to the bot, optionally providing the user's 2FA SRP parameters for identity verification, as described in callback queries.

Two-factor authentication #

How to login to a user's account if they have enabled 2FA, how to change password.