Skip to main content

Module api

Module api 

Source
Expand description

High-level, ergonomic wrappers over the Telegram WebApp JavaScript API. Bindings for the individual Telegram WebApp JavaScript APIs.

Each submodule wraps one area of the Telegram.WebApp interface, from sensor access and haptic feedback to storage, theming, and viewport information.

Modulesยง

accelerometer
Accelerometer sensor: three-axis acceleration readings.
biometric
Biometric manager: fingerprint/face authentication and access requests.
cloud_storage
Cloud storage: per-user key-value storage synced across devices.
device_orientation
Device orientation sensor: orientation angles in degrees.
device_storage
Device storage: local key-value storage on the current device.
events
WebApp event subscription helpers (onEvent/offEvent).
gyroscope
Gyroscope sensor: angular velocity readings.
haptic
Haptic feedback: impact, notification, and selection vibrations.
location_manager
Location manager: initialization and geolocation access.
secure_storage
Secure storage: encrypted key-value storage that survives reinstalls.
settings_button
Settings button: control over the WebApp settings button.
theme
Theme parameters exposed by the Telegram client.
user
User data and contact/permission requests.
viewport
Viewport dimensions and expansion state.