Skip to main content

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

NameTypeRequiredDescription
GameboolWhether this is a "play game" button
PeerInputPeerClassyesWhere was the inline keyboard sent
MsgIDintyesID of the Message with the inline keyboard
Data[]byteCallback data
PasswordInputCheckPasswordSRPClassFor buttons requiring you to verify your identity with your 2FA password, the SRP payload generated using SRP.

Returns

*MessagesBotCallbackAnswer

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.

References