invoke_web_view_custom_method()

async Client.invoke_web_view_custom_method()

Send a custom request from a Mini Bot App.

Usable by Users Bots
Parameters:
  • bot (int | str) – Unique identifier (int) or username (str) of the target bot.

  • custom_method (str) – Identifier of the custom method to invoke.

  • params (str | DataJSON) – JSON-serialized parameters or a DataJSON object.

Returns:

DataJSON – JSON-serialized response from Telegram.

Example

res = await app.invoke_web_view_custom_method("my_bot", "custom_func", '{"key": "value"}')