messages.RequestSimpleWebView

class pyrogram.raw.functions.messages.RequestSimpleWebView

Open a bot mini app.

Details:
  • Layer: 223

  • ID: 413A3E73

Parameters:
  • bot (InputUser) – Bot that owns the mini app

  • platform (str) – Short name of the application; 0-64 English letters, digits, and underscores

  • from_switch_webview (bool, optional) – Whether the webapp was opened by clicking on the switch_webview button shown on top of the inline results list returned by messages.getInlineBotResults.

  • from_side_menu (bool, optional) – Set this flag if opening the Mini App from the installed side menu entry ».

  • compact (bool, optional) – Deprecated.

  • fullscreen (bool, optional) – Requests to open the app in fullscreen mode.

  • url (str, optional) – Web app URL, if opening from a keyboard button or inline result

  • start_param (str, optional) – Deprecated.

  • theme_params (DataJSON, optional) – Theme parameters »

Returns:

WebViewResult

TL Schema

messages.requestSimpleWebView#413a3e73
flags:#
from_switch_webview:flags.1?true
from_side_menu:flags.2?true
compact:flags.7?true
fullscreen:flags.8?true
bot:InputUser
url:flags.3?string
start_param:flags.4?string
theme_params:flags.0?DataJSON
platform:string

= WebViewResult

Parameter Tree

RequestSimpleWebView
├── from_switch_webviewtrue (optional)
├── from_side_menutrue (optional)
├── compacttrue (optional)
├── fullscreentrue (optional)
├── botInputUser
│ ├── InputUserEmpty
│ ├── InputUserSelf
│ ├── InputUser
│ │ ├── user_idlong
│ │ └── access_hashlong
│ └── InputUserFromMessage
│ ├── peerInputPeer
│ │ ├── InputPeerEmpty
│ │ ├── InputPeerSelf
│ │ ├── InputPeerChat
│ │ ├── InputPeerUser
│ │ ├── InputPeerChannel
│ │ ├── InputPeerUserFromMessage
│ │ └── InputPeerChannelFromMessage
│ ├── msg_idint
│ └── user_idlong
├── urlstring (optional)
├── start_paramstring (optional)
├── theme_paramsDataJSON (optional)
│ └── DataJSON
│ └── datastring
└── platformstring

Example

await app.invoke(
    RequestSimpleWebView(
        from_switch_webview=None,
        from_side_menu=None,
        compact=None,
        fullscreen=None,
        bot=await app.resolve_user(chat_id),
        url="https://google.com",
        start_param="text",
        theme_params=DataJSON(data="text"),
        platform="text",
    )
)