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
| Name | Type | Required | Description |
|---|---|---|---|
Compact | bool | — | 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 | bool | — | 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 | InputPeerClass | yes | Currently open chat, may be inputPeerEmpty if no chat is currently open. |
Bot | InputUserClass | yes | Bot that owns the main mini app. |
StartParam | string | — | Start parameter, if opening from a Main Mini App link ». |
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. |
References
- Official documentation
- Generated Go reference
- TL definition:
messages.requestMainWebView#c9e01e7b