Bot API 7.2+ Occurs whenever biometric authentication was requested.
eventHandler receives an object with the field isAuthenticated containing a boolean
indicating whether the user was authenticated successfully. If isAuthenticated is true,
the field biometricToken will contain the biometric token stored in secure storage on
the device.
Bot API 7.2+ Occurs whenever the biometric token was updated.
eventHandler receives an object with the single field isUpdated, containing a boolean
indicating whether the token was updated.
Bot API 6.4+ Occurrs when the readTextFromClipboard method is called.
eventHandler receives an object with the single field data containing text data from
the clipboard. If the clipboard contains non-text data, the field data will be an empty
string. If the Mini App has no access to the clipboard, the field data will be null.
Bot API 6.9+ Occurrs when the user's phone number was requested.
eventHandler receives an object with the single field status containing one of the
statuses:
Occurs with the specified frequency after calling the start method,
sending the current orientation data.eventHandler receives no parameters,
the current device orientation values can be received via this.alpha,
this.beta and this.gamma respectively.
Occurs if a request to start device orientation tracking fails.
eventHandler receives an object with the single field error,
describing the reason for the failure. Possible values for error are:
Occurs with the specified frequency after calling the start method,
sending the current orientation data.eventHandler receives no parameters,
the current device orientation values can be received via this.alpha,
this.beta and this.gamma respectively.
Bot API 6.1+ Occurrs when the opened invoice is closed.
eventHandler receives an object with the two fields: url – invoice link provided and
status – one of the invoice statuses:
Bot API 6.2+ Occurrs when the opened popup is closed.
eventHandler receives an object with the single field button_id – the value of the field
id of the pressed button. If no buttons were pressed, the field button_id will be null.
Bot API 6.4+ Occurs when the QR code scanner catches a code with text data.
eventHandler receives an object with the single field data containing text data from
the QR code.
Occurs whenever theme settings are changed in the user's Telegram app (including
switching to night mode).
eventHandler receives no parameters, new theme settings and color scheme can be
received via this.themeParams and this.colorScheme respectively.
Occurs when the visible section of the Mini App is changed.
eventHandler receives an object with the single field isStateStable. If isStateStable is
true, the resizing of the Mini App is finished. If it is false, the resizing is ongoing (the
user is expanding or collapsing the Mini App or an animated object is playing). The
current value of the visible section’s height is available in this.viewportHeight.
This object contains data that is transferred to the Mini App when it is opened.
It is empty if the Mini App was launched from a keyboard button or from inline mode.
Bot API 6.9+ Occurs when the write permission was requested.
eventHandler receives an object with the single field status containing one of the
statuses: