pub struct InitData {
pub auth_date: u64,
pub can_send_after: Option<u32>,
pub chat: Option<Chat>,
pub chat_type: Option<ChatType>,
pub chat_instance: Option<i64>,
pub hash: String,
pub query_id: Option<String>,
pub receiver: Option<User>,
pub start_param: Option<String>,
pub user: Option<User>,
pub signature: Option<String>,
}
Expand description
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. See: https://core.telegram.org/bots/webapps#webappinitdata
Fields§
§auth_date: u64
Unix time when the form was opened.
can_send_after: Option<u32>
Optional. Time in seconds, after which a message can be sent via the answerWebAppQuery method.
chat: Option<Chat>
Optional. 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<ChatType>
Optional. Type of the chat from which the Mini App was opened. Can be either “sender” for a private chat with the user opening the link, “private”, “group”, “supergroup”, or “channel”. Returned only for Mini Apps launched from direct links.
chat_instance: Option<i64>
Optional. Global identifier, uniquely corresponding to the chat from which the Mini App was opened. Returned only for Mini Apps launched from a direct link.
hash: String
A hash of all passed parameters, which the bot server can use to check their validity.
query_id: Option<String>
Optional. A unique identifier for the Mini App session, required for sending messages via the answerWebAppQuery method.
receiver: Option<User>
Optional. 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>
Optional. The value of the startattach parameter, passed via link. Only returned for Mini Apps when launched from the attachment menu via link. The value of the start_param parameter will also be passed in the GET-parameter tgWebAppStartParam, so the Mini App can load the correct interface right away.
user: Option<User>
Optional. An object containing data about the current user.
signature: Option<String>
A signature of all passed parameters (except hash), which the third party can use to check their validity. This field is only for third-party validation, shall be optional?