messages.requestSimpleWebView

Open a bot mini app.

simpleWebViewResultUrl#882f76bb url:string = SimpleWebViewResult;
---functions---
messages.requestSimpleWebView#299bec8e flags:# from_switch_webview:flags.1?true bot:InputUser url:string theme_params:flags.0?DataJSON platform:string = SimpleWebViewResult;

Parameters

Name Type Description
flags # Flags, see TL conditional fields
from_switch_webview flags.1?true Whether the webapp was opened by clicking on the switch_webview button shown on top of the inline results list returned by messages.getInlineBotResults.
from_side_menu flags.2?true Set this flag if opening the Mini App from the installed side menu entry ».
compact flags.7?true Deprecated.
bot InputUser Bot that owns the mini app
url flags.3?string Web app URL, if opening from a keyboard button or inline result
start_param flags.4?string Deprecated.
theme_params flags.0?DataJSON Theme parameters »
platform string Short name of the application; 0-64 English letters, digits, and underscores

Result

WebViewResult

Possible errors

Code Type Description
400 BOT_INVALID This is not a valid bot.
400 URL_INVALID Invalid URL provided.

Related pages

messages.getInlineBotResults

Query an inline bot

Bot attachment menu and side menu entries

Bots can install attachment menu and side menu entries, offering conveniently accessible, versatile web apps.

Mini Apps on Telegram

Bots can offer users interactive HTML5 web apps to completely replace any website.