Skip to content

GramIO API Reference / @gramio/init-data/dist / WebAppUser

Type Alias: WebAppUser<isReceiver>

WebAppUser<isReceiver> = object & isReceiver extends true ? object : object

Defined in: init-data/index.d.ts:10

This object contains the data of the Mini App user.

Type Declaration

NameTypeDescriptionDefined in
added_to_attachment_menu?booleanTrue, if this user added the bot to the attachment menu.init-data/index.d.ts:34
allows_write_to_pm?booleanTrue, if this user allowed the bot to message them.init-data/index.d.ts:38
first_namestringFirst name of the user or bot.init-data/index.d.ts:18
idnumberA unique identifier for the user or bot. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. It has at most 52 significant bits, so a 64-bit integer or a double-precision float type is safe for storing this identifier.init-data/index.d.ts:14
is_premium?booleanTrue, if this user is a Telegram Premium user.init-data/index.d.ts:30
last_name?stringLast name of the user or bot.init-data/index.d.ts:22
photo_url?stringURL of the user’s profile photo. The photo can be in .jpeg or .svg formats. Only returned for Mini Apps launched from the attachment menu.init-data/index.d.ts:43
username?stringUsername of the user or bot.init-data/index.d.ts:26

Type Parameters

Type ParameterDefault type
isReceiver extends booleanfalse