diff --git a/data/web/corefork.telegram.org/api/bots/webapps.html b/data/web/corefork.telegram.org/api/bots/webapps.html
index 06125d40aa..aee0a32caa 100644
--- a/data/web/corefork.telegram.org/api/bots/webapps.html
+++ b/data/web/corefork.telegram.org/api/bots/webapps.html
@@ -253,6 +253,7 @@ Note that eventual errors will not be sent as a failed
event if the
accent_text_color
- Accent text colorsection_bg_color
- Section background colorsection_header_text_color
- Section header text colorsection_separator_color
- Section separator colorsubtitle_text_color
- Sub title text colordestructive_text_color
- Text color for destructive action buttons in promptsfailed
event if the
status
- sent
or cancelled
Used by clients to reply to a web_app_request_phone
event », indicating whether the user has shared their phone number with the bot (allowed
) or not (cancelled
).
biometry_auth_requested
biometry_token_updated
biometry_info_received
custom_method_invoked
Params: a JSON object with the following fields:
'*
Event types
eventType
is a simple string indicating the event type, and eventData
is a payload with an object that will be parsed by the Telegram app.
web_app_close
-No event payload.
+No event payload, OR a JSON object with the following fields (which should be properly validated by the client).
+
+return_back
- If true, the client should return to the previous activity. (boolean, optional)
+
Emitted by bot mini apps when the mini app webview should be closed.
web_app_open_popup
Event data: a JSON object with the following fields (which should be properly validated by the client).
@@ -102,6 +105,32 @@ Otherwise, if the user refuses or the bo
Upon receiving this event, clients should show a prompt to the user, indicating that the bot is asking them to share their phone number (optionally also asking the user to unblock the bot, if it's currently blocked).
If they accept, the user's phone number should be shared by sending a contact to the bot (unblocking it first, if it's currently blocked by the user); if all RPC queries (to unblock the bot, to send the message) succeed, a phone_requested event » should be sent with {"status": "sent"}
.
If the user refuses or any intermdiate method call fails, a phone_requested event » should be sent with {"status": "cancelled"}
.
+web_app_biometry_get_info
+Event data: null
+Emitted by bot mini apps to ask the client to initialize the biometric authentication manager object for the current bot, emitting a biometry_info_received
event » on completion.
+This request should just initialize the client-side state, i.e. by checking if biometric authentication is even available or not, it should not ask the user anything.
+web_app_biometry_request_access
+Event data: a JSON object, with an optional reason
string field, containing the reason why the bot is asking to use biometric authentication.
+Emitted by bot mini apps to ask the user permission to use biometric authentication, emitting a biometry_info_received
event » on completion.
+This request should not actually prompt biometric authentication, it should just ask the user permission to use them, and a popup should be shown only if the user hasn't already allowed or denied the usage of biometric authentication for the bot associated to the mini app.
+web_app_biometry_update_token
+Event data: a JSON object with the following fields:
+
+token
- The new token (string, max 1024 chars), or an empty string to remove it.
+reason
- Optional string field, containing the reason why the bot is asking to authenticate using biometrics.
+
+Emitted by bot mini apps to authenticate using biometrics and store the biometric token securely stored on-device, emitting a biometry_token_updated
event » on completion.
+This token (which may be for example the private key of a cryptocurrency wallet, or some other data the app must keep safe) must be safely stored by the Telegram client, associating it to the bot that owns the mini app.
+For example, the token may be directly stored in the on-device secure storage, accessible only after biometric authentication, or it may be stored to normal, non-secure storage, but in encrypted form, encrypted using the key returned from the device's secure storage after biometric authentication (for example on Android, using the CryptoObject returned by the biometric prompt authentication result).
+If the user has previously disallowed the bot from using biometric authentication, this request should immediately fail, emitting an appropriate biometry_token_updated
event ».
+web_app_biometry_request_auth
+Event data: a JSON object, with an optional reason
string field, containing the reason why the bot is asking to authenticate using biometrics.
+Emitted by bot mini apps to authenticate using biometrics, emitting a biometry_auth_requested
event » on completion, containing either the error, or the decrypted previously stored biometric token » (or an empty string if no token was configured yet).
+If the user has previously disallowed the bot from using biometric authentication, this request should immediately fail, emitting an appropriate biometry_auth_requested
event ».
+web_app_biometry_open_settings
+Event data: null
+Emitted by bot mini apps to open the biometric authentication settings page for bots, useful when the app needs to request biometrics access from users who have previously denied it.
+Note that this event should only be handled in response to user interaction with the Mini App interface (e.g. a click inside the Mini App or on the main button), and it must be handled at most once a second.
web_app_invoke_custom_method
Event data: a JSON object with the following fields:
@@ -205,6 +234,21 @@ If empty, the current chat is used.
url
- The URL to open
try_instant_view
- Optional boolean, if set, equal to true
and the scheme of the URL is either http
or https
, the link should be opened in Instant View mode if possible.
+try_browser
- Optional string, if set, must contain one of the following browser identifiers, and the client should attempt to open the link using the specified browser (if it's currently installed on the device):
+google-chrome
or chrome
- Google Chrome
+mozilla-firefox
or firefox
- Firefox
+microsoft-edge
or edge
- Microsoft Edge
+opera
- Opera
+opera-mini
- Opera Mini
+brave
or brave-browser
- Brave Browser
+duckduckgo
or duckduckgo-browser
- Duckduckgo Browser
+samsung
or samsung-browser
- Samsung Browser
+vivaldi
or vivaldi-browser
- Vivaldi
+kiwi
or ĸiwi-browser
- Kiwi
+uc
or uc-browser
- UC browser
+tor
or tor-browser
- TOR browser
+
+
Used to open a link in an external browser (or in a new tab for browser clients). The Mini App will not be closed.
Only URLs with the scheme equal to one of the schemes specified in web_app_allowed_protocols may be opened.