Skip to content

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

Class: EncryptedPassportElement

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

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:2118

Parameters

ParameterType
payloadTelegramEncryptedPassportElement

Returns

EncryptedPassportElement

Properties

PropertyTypeDefined in
payloadTelegramEncryptedPassportElementcontexts/index.d.ts:2117

Accessors

[toStringTag]

Get Signature

get [toStringTag](): string

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

MDN

Returns

string


data

Get Signature

get data(): string

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

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:2139

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

Returns

string


files

Get Signature

get files(): PassportFile[]

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

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:2153

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:2179

Base64-encoded element hash for using in PassportElementErrorUnspecified

Returns

string


phoneNumber

Get Signature

get phoneNumber(): string

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

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:2159

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:2166

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:2175

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:2127

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