GetBotCallbackAnswerRequest
Only users can use this request. See code examples.
---functions--- messages.getBotCallbackAnswer#9342ca07 flags:# game:flags.1?true peer:InputPeer msg_id:int data:flags.0?bytes password:flags.2?InputCheckPasswordSRP = messages.BotCallbackAnswer
Returns
| messages.BotCallbackAnswer | 
This type can only be an instance of:
| BotCallbackAnswer | 
Parameters
| peer | InputPeer | Anything entity-like will work if the library can find its Inputversion (e.g., usernames,Peer,UserorChannelobjects, etc.). | 
| msg_id | int | |
| game | flag | This argument defaults to Noneand can be omitted. | 
| data | bytes | This argument defaults to Noneand can be omitted. | 
| password | InputCheckPasswordSRP | This argument defaults to Noneand can be omitted. | 
Known RPC errors
This request can cause 6 known errors:
| BotResponseTimeoutError | The bot did not answer to the callback query in time. | 
| ChannelInvalidError | Invalid channel object. Make sure to pass the right types, for instance making sure that the request is designed for channels or otherwise look for a different one more suited. | 
| DataInvalidError | Encrypted data invalid. | 
| MessageIdInvalidError | The specified message ID is invalid or you can't do that operation on such message. | 
| PeerIdInvalidError | An invalid Peer was used. Make sure to pass the right peer type and that the value is valid (for instance, bots cannot start conversations). | 
| TimeoutError | A timeout occurred while fetching data from the worker. | 
You can import these from telethon.errors.
Example
from telethon.sync import TelegramClient
from telethon import functions, types
with TelegramClient(name, api_id, api_hash) as client:
    result = client(functions.messages.GetBotCallbackAnswerRequest(
        peer='username',
        msg_id=42,
        game=True,
        data=b'arbitrary\x7f data \xfa here',
        password=types.InputCheckPasswordSRP(
            srp_id=-12398745604826,
            A=b'arbitrary\x7f data \xfa here',
            M1=b'arbitrary\x7f data \xfa here'
        )
    ))
    print(result.stringify())