RequestAppWebViewRequest
Both users and bots may be able to use this request. See code examples.
---functions--- messages.requestAppWebView#53618bce flags:# write_allowed:flags.0?true compact:flags.7?true fullscreen:flags.8?true peer:InputPeer app:InputBotApp start_param:flags.1?string theme_params:flags.2?DataJSON platform:string = WebViewResult
Returns
| WebViewResult |
This type can only be an instance of:
| WebViewResultUrl |
Parameters
| peer | InputPeer | Anything entity-like will work if the library can find its Input version (e.g., usernames, Peer, User or Channel objects, etc.). |
| app | InputBotApp | |
| platform | string | |
| write_allowed | flag | This argument defaults to None and can be omitted. |
| compact | flag | This argument defaults to None and can be omitted. |
| fullscreen | flag | 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.RequestAppWebViewRequest(
peer='username',
app=types.InputBotAppID(
id=-12398745604826,
access_hash=-12398745604826
),
platform='some string here',
write_allowed=True,
compact=True,
fullscreen=True,
start_param='some string here',
theme_params=types.DataJSON(
data='some string here'
)
))
print(result.stringify())