WebAppInitData
in package
Parsed representation of Telegram WebApp init data.
Minimal hand-rolled DTO mirroring WebAppInitData from
aiogram/utils/web_app.py. Generated Telegram types in
src/Types/Generated/ do not include this structure, so it lives here.
Table of Contents
Properties
- $authDate : int
- Unix timestamp of when the init data was created.
- $canSendAfter : int|null
- Duration in seconds for which the Mini App can be opened without requiring user interaction.
- $chat : WebAppChat|null
- The chat from which the Mini App was opened (supergroup/channel).
- $chatInstance : string|null
- The global identifier of the chat from which the Mini App was opened.
- $chatType : string|null
- The type of chat from which the Mini App was opened.
- $hash : string
- HMAC-SHA256 hash for integrity verification.
- $queryId : string|null
- Optional query id from the Mini App launch.
- $receiver : WebAppUser|null
- The user who initiated the conversation (in group context).
- $startParam : string|null
- The value of the `startattach` parameter or an empty string.
- $user : WebAppUser|null
- The user who opened the Mini App.
Methods
- __construct() : mixed
Properties
$authDate read-only
Unix timestamp of when the init data was created.
public
int
$authDate
$canSendAfter read-only
Duration in seconds for which the Mini App can be opened without requiring user interaction.
public
int|null
$canSendAfter
= null
$chat read-only
The chat from which the Mini App was opened (supergroup/channel).
public
WebAppChat|null
$chat
= null
$chatInstance read-only
The global identifier of the chat from which the Mini App was opened.
public
string|null
$chatInstance
= null
$chatType read-only
The type of chat from which the Mini App was opened.
public
string|null
$chatType
= null
$hash read-only
HMAC-SHA256 hash for integrity verification.
public
string
$hash
$queryId read-only
Optional query id from the Mini App launch.
public
string|null
$queryId
= null
$receiver read-only
The user who initiated the conversation (in group context).
public
WebAppUser|null
$receiver
= null
$startParam read-only
The value of the `startattach` parameter or an empty string.
public
string|null
$startParam
= null
$user read-only
The user who opened the Mini App.
public
WebAppUser|null
$user
= null
Methods
__construct()
public
__construct(int $authDate, string $hash[, string|null $queryId = null ][, WebAppUser|null $user = null ][, WebAppUser|null $receiver = null ][, WebAppChat|null $chat = null ][, string|null $chatType = null ][, string|null $chatInstance = null ][, string|null $startParam = null ][, int|null $canSendAfter = null ]) : mixed
Parameters
- $authDate : int
- $hash : string
- $queryId : string|null = null
- $user : WebAppUser|null = null
- $receiver : WebAppUser|null = null
- $chat : WebAppChat|null = null
- $chatType : string|null = null
- $chatInstance : string|null = null
- $startParam : string|null = null
- $canSendAfter : int|null = null