class EncryptedPassportElement

Describes documents or other Telegram Passport elements shared with the bot by the user.

Methods

__construct(string $type, string $hash, string|null $data = null, string|null $phone_number = null, string|null $email = null, PassportFile[]|null $files = null, PassportFile|null $front_side = null, PassportFile|null $reverse_side = null, PassportFile|null $selfie = null, PassportFile[]|null $translation = null)

No description

string
getType()

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”.

string
getHash()

Base64-encoded element hash for using in PassportElementErrorUnspecified.

string|null
getData()

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

string|null
getPhoneNumber()

Optional. User's verified phone number, available only for “phone_number” type.

string|null
getEmail()

Optional. User's verified email address, available only for “email” type.

array|null
getFiles()

Optional. 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.

PassportFile|null
getFrontSide()

Optional. 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.

PassportFile|null
getReverseSide()

Optional. 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.

PassportFile|null
getSelfie()

Optional. 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.

array|null
getTranslation()

Optional. 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.

Details

at line 22
__construct(string $type, string $hash, string|null $data = null, string|null $phone_number = null, string|null $email = null, PassportFile[]|null $files = null, PassportFile|null $front_side = null, PassportFile|null $reverse_side = null, PassportFile|null $selfie = null, PassportFile[]|null $translation = null)

No description

Parameters

string $type
string $hash
string|null $data
string|null $phone_number
string|null $email
PassportFile[]|null $files
PassportFile|null $front_side
PassportFile|null $reverse_side
PassportFile|null $selfie
PassportFile[]|null $translation

at line 39
string getType()

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”.

Return Value

string

at line 47
string getHash()

Base64-encoded element hash for using in PassportElementErrorUnspecified.

Return Value

string

at line 55
string|null getData()

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

Return Value

string|null

at line 63
string|null getPhoneNumber()

Optional. User's verified phone number, available only for “phone_number” type.

Return Value

string|null

at line 71
string|null getEmail()

Optional. User's verified email address, available only for “email” type.

Return Value

string|null

at line 81
array|null getFiles()

Optional. 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.

Return Value

array|null

at line 89
PassportFile|null getFrontSide()

Optional. 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.

Return Value

PassportFile|null

at line 97
PassportFile|null getReverseSide()

Optional. 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.

Return Value

PassportFile|null

at line 105
PassportFile|null getSelfie()

Optional. 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.

Return Value

PassportFile|null

at line 115
array|null getTranslation()

Optional. 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.

Return Value

array|null