Skip to main content

messages.requestSimpleWebView

Open a bot mini app.

func (c *Client) MessagesRequestSimpleWebView(ctx context.Context, request *MessagesRequestSimpleWebViewRequest) (*WebViewResultURL, error)

Calling this method​

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

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

Parameters​

NameTypeRequiredDescription
FromSwitchWebviewbool—Whether the webapp was opened by clicking on the switch_webview button shown on top of the inline results list returned by messages.getInlineBotResults.
FromSideMenubool—Set this flag if opening the Mini App from the installed side menu entry ».
Compactbool—Deprecated.
Fullscreenbool—Requests to open the app in fullscreen mode.
BotInputUserClassyesBot that owns the mini app
URLstring—Web app URL, if opening from a keyboard button or inline result
StartParamstring—Deprecated.
ThemeParamsDataJSON—Theme 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.
400URL_INVALIDInvalid URL provided.

References​