messages.RequestAppWebView

class pyrogram.raw.functions.messages.RequestAppWebView

Open a bot mini app from a direct Mini App deep link, sending over user information after user confirmation.

Details:
  • Layer: 223

  • ID: 53618BCE

Parameters:
  • peer (InputPeer) – If the client has clicked on the link in a Telegram chat, pass the chat’s peer information; otherwise pass the bot’s peer information, instead.

  • app (InputBotApp) – The app obtained by invoking messages.getBotApp as specified in the direct Mini App deep link docs.

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

  • write_allowed (bool, optional) – Set this flag if the bot is asking permission to send messages to the user as specified in the direct Mini App deep link docs, and the user agreed.

  • 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 direct Mini App deep 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 direct Mini App deep link is equal to fullscreen.

  • start_param (str, optional) – If the startapp query string parameter is present in the direct Mini App deep link, pass it to start_param.

  • theme_params (DataJSON, optional) – Theme parameters »

Returns:

WebViewResult

TL Schema

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

Parameter Tree

RequestAppWebView
├── write_allowedtrue (optional)
├── 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
├── appInputBotApp
│ ├── InputBotAppID
│ │ ├── idlong
│ │ └── access_hashlong
│ └── InputBotAppShortName
│ ├── bot_idInputUser
│ │ ├── InputUserEmpty
│ │ ├── InputUserSelf
│ │ ├── InputUser
│ │ └── InputUserFromMessage
│ └── short_namestring
├── start_paramstring (optional)
├── theme_paramsDataJSON (optional)
│ └── DataJSON
│ └── datastring
└── platformstring

Example

await app.invoke(
    RequestAppWebView(
        write_allowed=None,
        compact=None,
        fullscreen=None,
        peer=await app.resolve_peer(chat_id),
        app=InputBotAppID(
            id=0,
            access_hash=0
        ),
        start_param="text",
        theme_params=DataJSON(data="text"),
        platform="text",
    )
)