messages.RequestMainWebView

class pyrogram.raw.functions.messages.RequestMainWebView

Open a Main Mini App.

Details:
  • Layer: 223

  • ID: C9E01E7B

Parameters:
  • peer (InputPeer) – Currently open chat, may be inputPeerEmpty if no chat is currently open.

  • bot (InputUser) – Bot that owns the main mini app.

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

  • compact (bool, optional) – If set, requests to open the mini app in compact mode (as opposed to normal or fullscreen mode). Must be set if the mode parameter of the Main Mini App link is equal to compact.

  • fullscreen (bool, optional) – If set, requests to open the mini app in fullscreen mode (as opposed to compact or normal mode). Must be set if the mode parameter of the Main Mini App link is equal to fullscreen.

  • start_param (str, optional) – Start parameter, if opening from a Main Mini App link ».

  • theme_params (DataJSON, optional) – Theme parameters »

Returns:

WebViewResult

TL Schema

messages.requestMainWebView#c9e01e7b
flags:#
compact:flags.7?true
fullscreen:flags.8?true
peer:InputPeer
bot:InputUser
start_param:flags.1?string
theme_params:flags.0?DataJSON
platform:string

= WebViewResult

Parameter Tree

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

Example

await app.invoke(
    RequestMainWebView(
        compact=None,
        fullscreen=None,
        peer=await app.resolve_peer(chat_id),
        bot=await app.resolve_user(chat_id),
        start_param="text",
        theme_params=DataJSON(data="text"),
        platform="text",
    )
)