messages.getBotCallbackAnswer
Press an inline callback button and get a callback answer from the bot
func (c *Client) MessagesGetBotCallbackAnswer(ctx context.Context, request *MessagesGetBotCallbackAnswerRequest) (*MessagesBotCallbackAnswer, error)
Calling this method
client.Run(ctx, func(ctx context.Context) error {
api := client.API()
res, err := api.MessagesGetBotCallbackAnswer(ctx, &tg.MessagesGetBotCallbackAnswerRequest{
// see Parameters
})
if err != nil {
return err
}
_ = res // *MessagesBotCallbackAnswer
return nil
})
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
Game | bool | — | Whether this is a "play game" button |
Peer | InputPeerClass | yes | Where was the inline keyboard sent |
MsgID | int | yes | ID of the Message with the inline keyboard |
Data | []byte | — | Callback data |
Password | InputCheckPasswordSRPClass | — | For buttons requiring you to verify your identity with your 2FA password, the SRP payload generated using SRP. |
Returns
Possible 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 | MSG_ID_INVALID | Invalid message ID provided. |
| 400 | PASSWORD_MISSING | You must enable 2FA before executing this operation. |
| 400 | PEER_ID_INVALID | The provided peer id is invalid. |
References
- Official documentation
- Generated Go reference
- TL definition:
messages.getBotCallbackAnswer#9342ca07