pub struct InitData {
pub auth_date: u64,
pub can_send_after: Option<u64>,
pub chat: Option<Chat>,
pub chat_type: Option<String>,
pub chat_instance: Option<String>,
pub hash: String,
pub query_id: String,
pub receiver: Option<User>,
pub start_param: Option<String>,
pub user: Option<User>,
}
Expand description
Contains launch parameters data https://docs.telegram-mini-apps.com/platform/init-data#parameters-list
Fields§
§auth_date: u64
The date the initialization data was created. Is a number representing a Unix timestamp.
can_send_after: Option<u64>
The number of seconds after which a message can be sent via the method answerWebAppQuery.
chat: Option<Chat>
An object containing data about the chat where the bot was launched via the attachment menu. Returned for supergroups, channels and group chats - only for Mini Apps launched via the attachment menu.
chat_type: Option<String>
The type of chat from which the Mini Apps was opened. Returned only for applications opened by direct link.
chat_instance: Option<String>
A global identifier indicating the chat from which the Mini Apps was opened. Returned only for applications opened by direct link.
hash: String
Initialization data signature.
query_id: String
The unique session ID of the Mini App. Used in the process of sending a message via the method answerWebAppQuery.
receiver: Option<User>
An object containing data about the chat partner of the current user in the chat where the bot was launched via the attachment menu. Returned only for private chats and only for Mini Apps launched via the attachment menu.
start_param: Option<String>
The value of the startattach or startapp query parameter specified in the link. It is returned only for Mini Apps opened through the attachment menu.
user: Option<User>
An object containing information about the current user.