diff --git a/data/web/corefork.telegram.org/api/bots/webapps.html b/data/web/corefork.telegram.org/api/bots/webapps.html index 163ae4f7d1..fe927bf45e 100644 --- a/data/web/corefork.telegram.org/api/bots/webapps.html +++ b/data/web/corefork.telegram.org/api/bots/webapps.html @@ -69,8 +69,53 @@ messages.requestSimpleWebView#6abb2f73 flags:# bot:InputUser url:string theme_params:flags.0?DataJSON = SimpleWebViewResult; messages.sendWebViewResultMessage#a4314f5 bot_query_id:string result:InputBotInlineResult = WebViewMessageSent; messages.sendWebViewData#dc0242c8 bot:InputUser random_id:long button_text:string data:string = Updates; -
Both simple and normal should handle web events starting with web_app_
; see the web event documentation for more info ».
Both simple and normal can send web events starting with web_app_
; see the web event documentation for the full list of events that can be sent by the web app to the client ».
Web apps can also receive events, by exposing a window.Telegram.WebView.receiveEvent("event_name", params)
method.
Here's the full list of events that can be received by a web app from the client.
+phone_requested
Params: a JSON object containing an optional string phone_number
field.
Sent in response to a web_app_request_phone outgoing event, see the docs for more info ».
+back_button_pressed
Params: null
Sent by the client when the user presses the back button, if it was previously enabled by a web_app_setup_back_button
event
invoice_closed
Params: JSON object with the following fields:
+slug
- Invoice slugstatus
- settings_button_pressed
Params: null
Sent by the client when the user presses the settings button, if it was previously enabled in BotFather.
+main_button_pressed
Params: null
Sent by the client when the user presses the main button, if it was previously configured by a web_app_setup_main_button
event
viewport_changed
Params: a JSON object with the following fields:
+height
-is_state_stable
-is_expanded
- theme_changed
Params: a JSON object with the following fields:
+theme_params
: a JSON object with the following fields:bg_color
-secondary_bg_color
-text_color
- hint_color
- link_color
- button_color
- button_text_color
- popup_closed
Params: a JSON object with an optional button_id
string field.
Emitted when the user presses a button or cancels a popup brought up by a previous web_app_open_popup
event.
Schema:
replyKeyboardMarkup#85dd99d1 flags:# resize:flags.0?true single_use:flags.1?true selective:flags.2?true rows:Vector<KeyboardButtonRow> placeholder:flags.3?string = ReplyMarkup;