RequestSimpleWebViewRequest
Both users and bots may be able to use this request. See code examples.
---functions--- messages.requestSimpleWebView#1a46500a flags:# from_switch_webview:flags.1?true from_side_menu:flags.2?true bot:InputUser url:flags.3?string start_param:flags.4?string theme_params:flags.0?DataJSON platform:string = SimpleWebViewResult
Returns
SimpleWebViewResult |
This type can only be an instance of:
SimpleWebViewResultUrl |
Parameters
bot | InputUser | Anything entity-like will work if the library can find its Input version (e.g., usernames, Peer , User or Channel objects, etc.). |
platform | string | |
from_switch_webview | flag | This argument defaults to None and can be omitted. |
from_side_menu | flag | This argument defaults to None and can be omitted. |
url | string | This argument defaults to None and can be omitted. |
start_param | string | This argument defaults to None and can be omitted. |
theme_params | DataJSON | This 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.messages.RequestSimpleWebViewRequest( bot='username', platform='some string here', from_switch_webview=True, from_side_menu=True, url='some string here', start_param='some string here', theme_params=types.DataJSON( data='some string here' ) )) print(result.stringify())