Layer 220
method Users
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;

Parameters

Name Type Description
Flags # Flags, see TL conditional fields
Compact flags.7?true 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 flags.8?true 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.
Peer InputPeer Currently open chat, may be input Peer Empty if no chat is currently open.
Bot InputUser Bot that owns the main mini app.
StartParam flags.1?string Start parameter, if opening from a Main Mini App link.
ThemeParams flags.0?DataJSON Theme parameters
Platform string Short name of the application; 0-64 English letters, digits, and underscores

Returns

WebViewResult

Possible Errors

Code Type Description
400 BOT_INVALID This is not a valid bot.

Gogram Example

// MessagesRequestMainWebView - using Params struct
result, err := client.MessagesRequestMainWebView(&tg.MessagesRequestMainWebViewParams{
    Peer: &tg.InputPeerUser{UserID: int64(123456789)},
    Bot: &tg.InputUserSelf{},
    Platform: "...",

    // Optional fields:
    // Compact: true,
    // Fullscreen: true,
    // StartParam: "...",
    // ThemeParams: &tg.DataJson{},
})
if err != nil {
    // handle error
}
// result is *tg.WebViewResult