Telegram Mini Apps
Part of the API Reference.
verifyWebAppInitData
WebAppInitData verifyWebAppInitData(String initData)
Validates and parses the initData string a Telegram Mini App sends you, using this bot’s token to verify Telegram’s HMAC signature.
Always check .isValid on the result before trusting any of its fields — this confirms the data really came from Telegram and wasn’t tampered with by the client.