Skip to content

GramIO API Reference / @gramio/contexts/dist / EncryptedPassportElement

Class: EncryptedPassportElement ​

Defined in: contexts/index.d.ts:2691

Contains information about documents or other Telegram Passport elements shared with the bot by the user.

Constructors ​

Constructor ​

new EncryptedPassportElement(payload): EncryptedPassportElement

Defined in: contexts/index.d.ts:2693

Parameters ​

ParameterType
payloadTelegramEncryptedPassportElement

Returns ​

EncryptedPassportElement

Properties ​

PropertyTypeDefined in
payloadTelegramEncryptedPassportElementcontexts/index.d.ts:2692

Accessors ​

[toStringTag] ​

Get Signature ​

get [toStringTag](): string

Defined in: contexts/index.d.ts:2695

MDN

Returns ​

string


data ​

Get Signature ​

get data(): string

Defined in: contexts/index.d.ts:2710

Base64-encoded encrypted Telegram Passport element data provided by th user, available for personal_details, passport, driver_license, identity_card, internal_passport and address types. Can be decrypted and verified using the accompanying EncryptedCredentials.

Returns ​

string


email ​

Get Signature ​

get email(): string

Defined in: contexts/index.d.ts:2714

User's verified email address, available only for email type

Returns ​

string


files ​

Get Signature ​

get files(): PassportFile[]

Defined in: contexts/index.d.ts:2721

Array of encrypted files with documents provided by the user, available for utility_bill, bank_statement, rental_agreement, passport_registration and temporary_registration types. Files can be decrypted and verified using the accompanying EncryptedCredentials.

Returns ​

PassportFile[]


frontSide ​

Get Signature ​

get frontSide(): PassportFile

Defined in: contexts/index.d.ts:2728

Encrypted file with the front side of the document, provided by the user. Available for passport, driver_license, identity_card and internal_passport. The file can be decrypted and verified using the accompanying EncryptedCredentials.

Returns ​

PassportFile


hash ​

Get Signature ​

get hash(): string

Defined in: contexts/index.d.ts:2754

Base64-encoded element hash for using in PassportElementErrorUnspecified

Returns ​

string


phoneNumber ​

Get Signature ​

get phoneNumber(): string

Defined in: contexts/index.d.ts:2712

User's verified phone number, available only for phone_number type

Returns ​

string


reverseSide ​

Get Signature ​

get reverseSide(): PassportFile

Defined in: contexts/index.d.ts:2734

Encrypted file with the reverse side of the document, provided by the user. Available for driver_license and identity_card. The file can be decrypted and verified using the accompanying EncryptedCredentials.

Returns ​

PassportFile


selfie ​

Get Signature ​

get selfie(): PassportFile

Defined in: contexts/index.d.ts:2741

Encrypted file with the selfie of the user holding a document, provided by the user; available for passport, driver_license, identity_card and internal_passport. The file can be decrypted and verified using the accompanying EncryptedCredentials.

Returns ​

PassportFile


translation ​

Get Signature ​

get translation(): PassportFile[]

Defined in: contexts/index.d.ts:2750

Array of encrypted files with translated versions of documents provided by the user. Available if requested for passport, driver_license, identity_card, internal_passport, utility_bill, bank_statement, rental_agreement, passport_registration and temporary_registration types. Files can be decrypted and verified using the accompanying EncryptedCredentials.

Returns ​

PassportFile[]


type ​

Get Signature ​

get type(): TelegramEncryptedPassportElementType

Defined in: contexts/index.d.ts:2702

Element type. One of personal_details, passport, driver_license, identity_card, internal_passport, address, utility_bill, bank_statement, rental_agreement, passport_registration, temporary_registration, phone_number, email.

Returns ​

TelegramEncryptedPassportElementType