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
FromSwitchWebviewboolWhether the webapp was opened by clicking on the switch_webview button shown on top of the inline results list returned by messages.getInlineBotResults.
FromSideMenuboolSet this flag if opening the Mini App from the installed side menu entry ».
CompactboolDeprecated.
FullscreenboolRequests to open the app in fullscreen mode.
BotInputUserClassyesBot that owns the mini app
URLstringWeb app URL, if opening from a keyboard button or inline result
StartParamstringDeprecated.
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.
400URL_INVALIDInvalid URL provided.

References