PerformApiRequestRequest

Both users and bots may be able to use this request. See code examples.

---functions---
toncenter.performApiRequest#8d7bdd61 flags:# post:flags.0?true endpoint:string query:flags.1?string payload:flags.2?string = toncenter.ApiResponse

Returns

toncenter.ApiResponse

This type can only be an instance of:

ApiResponse

Parameters

endpointstring
postflagThis argument defaults to None and can be omitted.
querystringThis argument defaults to None and can be omitted.
payloadstringThis argument defaults to None and can be omitted.

Known RPC errors

This request can't cause any RPC error as far as we know.

Example

from telethon.sync import TelegramClient
from telethon import functions, types

with TelegramClient(name, api_id, api_hash) as client:
    result = client(functions.toncenter.PerformApiRequestRequest(
        endpoint='some string here',
        post=True,
        query='some string here',
        payload='some string here'
    ))
    print(result.stringify())