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
| Name | Type | Required | Description |
|---|---|---|---|
FromSwitchWebview | bool | — | Whether the webapp was opened by clicking on the switch_webview button shown on top of the inline results list returned by messages.getInlineBotResults. |
FromSideMenu | bool | — | Set this flag if opening the Mini App from the installed side menu entry ». |
Compact | bool | — | Deprecated. |
Fullscreen | bool | — | Requests to open the app in fullscreen mode. |
Bot | InputUserClass | yes | Bot that owns the mini app |
URL | string | — | Web app URL, if opening from a keyboard button or inline result |
StartParam | string | — | Deprecated. |
ThemeParams | DataJSON | — | Theme parameters » |
Platform | string | yes | Short name of the application; 0-64 English letters, digits, and underscores |
Returns
Possible errors
| Code | Type | Description |
|---|---|---|
| 400 | BOT_INVALID | This is not a valid bot. |
| 400 | URL_INVALID | Invalid URL provided. |
References
- Official documentation
- Generated Go reference
- TL definition:
messages.requestSimpleWebView#413a3e73