Skip to main content

messages.requestMainWebView

Open a Main Mini App.

func (c *Client) MessagesRequestMainWebView(ctx context.Context, request *MessagesRequestMainWebViewRequest) (*WebViewResultURL, error)

Calling this method

client.Run(ctx, func(ctx context.Context) error {
api := client.API()

res, err := api.MessagesRequestMainWebView(ctx, &tg.MessagesRequestMainWebViewRequest{
// see Parameters
})
if err != nil {
return err
}
_ = res // *WebViewResultURL
return nil
})

Parameters

NameTypeRequiredDescription
CompactboolIf 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.
FullscreenboolIf 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.
PeerInputPeerClassyesCurrently open chat, may be inputPeerEmpty if no chat is currently open.
BotInputUserClassyesBot that owns the main mini app.
StartParamstringStart parameter, if opening from a Main Mini App link ».
ThemeParamsDataJSONTheme parameters »
PlatformstringyesShort name of the application; 0-64 English letters, digits, and underscores

Returns

*WebViewResultURL

Possible errors

CodeTypeDescription
400BOT_INVALIDThis is not a valid bot.

References