Layer 220
MessagesGetBotCallbackAnswer
Press an inline callback button and get a callback answer from the bot
method
Users
messages.getBotCallbackAnswer#9342ca07 flags:# game:flags.1?true peer:InputPeer msg_id:int data:flags.0?bytes password:flags.2?InputCheckPasswordSRP = messages.BotCallbackAnswer;
Parameters
| Name | Type | Description |
|---|---|---|
| Flags | # | Flags, see TL conditional fields |
| Game | flags.1?true | Whether this is a "play game" button |
| Peer | InputPeer | Where was the inline keyboard sent |
| MsgId | int | ID of the Message with the inline keyboard |
| Data | flags.0?bytes | Callback data |
| Password | flags.2?InputCheckPasswordSRP | For buttons requiring you to verify your identity with your 2 FA password, the SRP payload generated using SRP. |
Returns
messages.BotCallbackAnswerPossible Errors
| Code | Type | Description |
|---|---|---|
| 400 | BOT_RESPONSE_TIMEOUT | A timeout occurred while fetching data from the bot. |
| 400 | CHANNEL_INVALID | The provided channel is invalid. |
| 400 | CHANNEL_PRIVATE | You haven't joined this channel/supergroup. |
| 400 | DATA_INVALID | Encrypted data invalid. |
| 400 | MESSAGE_ID_INVALID | The provided message id is invalid. |
| 400 | PASSWORD_MISSING | You must enable 2 FA before executing this operation. |
| 400 | PEER_ID_INVALID | The provided peer id is invalid. |
| -503 | Timeout | Timeout while fetching data. |
Gogram Example
// MessagesGetBotCallbackAnswer - using Params struct result, err := client.MessagesGetBotCallbackAnswer(&tg.MessagesGetBotCallbackAnswerParams{ Peer: &tg.InputPeerUser{UserID: int64(123456789)}, MsgId: 0, // Optional fields: // Game: true, // Data: []byte{}, // Password: &tg.InputCheckPasswordSrp{}, }) if err != nil { // handle error } // result is *tg.MessagesBotCallbackAnswer