AcceptCallRequest
Only users can use this request. See code examples.
---functions--- phone.acceptCall#3bd2b4a0 peer:InputPhoneCall g_b:bytes protocol:PhoneCallProtocol = phone.PhoneCall
Returns
phone.PhoneCall |
This type can only be an instance of:
PhoneCall |
Parameters
peer | InputPhoneCall | |
g_b | bytes | |
protocol | PhoneCallProtocol |
Known RPC errors
This request can cause 5 known errors:
CallAlreadyAcceptedError | The call was already accepted. |
CallAlreadyDeclinedError | The call was already declined. |
CallOccupyFailedError | The call failed because the user is already making another call. |
CallPeerInvalidError | The provided call peer object is invalid. |
CallProtocolFlagsInvalidError | Call protocol flags invalid. |
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.phone.AcceptCallRequest( peer=types.InputPhoneCall( id=-12398745604826, access_hash=-12398745604826 ), g_b=b'arbitrary\x7f data \xfa here', protocol=types.PhoneCallProtocol( min_layer=42, max_layer=42, library_versions=['some string here'], udp_p2p=True, udp_reflector=True ) )) print(result.stringify())