SecureValue

class pyrogram.raw.types.SecureValue

Secure value

Constructor of SecureValue.

Details:
  • Layer: 223

  • ID: 187FA0CA

Parameters:
  • type (SecureValueType) – Secure passport value type

  • hash (bytes) – Data hash

  • data (SecureData, optional) – Encrypted Telegram Passport element data

  • front_side (SecureFile, optional) – Encrypted passport file with the front side of the document

  • reverse_side (SecureFile, optional) – Encrypted passport file with the reverse side of the document

  • selfie (SecureFile, optional) – Encrypted passport file with a selfie of the user holding the document

  • translation (List of SecureFile, optional) – Array of encrypted passport files with translated versions of the provided documents

  • files (List of SecureFile, optional) – Array of encrypted passport files with photos the of the documents

  • plain_data (SecurePlainData, optional) – Plaintext verified passport data

Functions:

This object can be returned by 3 functions.

account.GetAllSecureValues

Get all saved Telegram Passport documents, for more info see the passport docs »

account.GetSecureValue

Get saved Telegram Passport document, for more info see the passport docs »

account.SaveSecureValue

Securely save Telegram Passport document, for more info see the passport docs »

TL Schema

secureValue#187fa0ca
flags:#
type:SecureValueType
data:flags.0?SecureData
front_side:flags.1?SecureFile
reverse_side:flags.2?SecureFile
selfie:flags.3?SecureFile
translation:flags.6?Vector<SecureFile>
files:flags.4?Vector<SecureFile>
plain_data:flags.5?SecurePlainData
hash:bytes

= SecureValue

Parameter Tree

SecureValue
├── typeSecureValueType
│ ├── SecureValueTypePhone
│ └── SecureValueTypeEmail
├── dataSecureData (optional)
│ └── SecureData
│ ├── databytes
│ ├── data_hashbytes
│ └── secretbytes
├── front_sideSecureFile (optional)
│ ├── SecureFileEmpty
│ └── SecureFile
│ ├── idlong
│ ├── access_hashlong
│ ├── sizelong
│ ├── dc_idint
│ ├── dateint
│ ├── file_hashbytes
│ └── secretbytes
├── reverse_sideSecureFile (optional)
│ ├── SecureFileEmpty
│ └── SecureFile
│ ├── idlong
│ ├── access_hashlong
│ ├── sizelong
│ ├── dc_idint
│ ├── dateint
│ ├── file_hashbytes
│ └── secretbytes
├── selfieSecureFile (optional)
│ ├── SecureFileEmpty
│ └── SecureFile
│ ├── idlong
│ ├── access_hashlong
│ ├── sizelong
│ ├── dc_idint
│ ├── dateint
│ ├── file_hashbytes
│ └── secretbytes
├── translationVector < SecureFile > (optional)
│ ├── SecureFileEmpty
│ └── SecureFile
│ ├── idlong
│ ├── access_hashlong
│ ├── sizelong
│ ├── dc_idint
│ ├── dateint
│ ├── file_hashbytes
│ └── secretbytes
├── filesVector < SecureFile > (optional)
│ ├── SecureFileEmpty
│ └── SecureFile
│ ├── idlong
│ ├── access_hashlong
│ ├── sizelong
│ ├── dc_idint
│ ├── dateint
│ ├── file_hashbytes
│ └── secretbytes
├── plain_dataSecurePlainData (optional)
│ ├── SecurePlainPhone
│ │ └── phonestring
│ └── SecurePlainEmail
│ └── emailstring
└── hashbytes

Example

SecureValue(
    type=SecureValueTypePersonalDetails(),
    hash=b"data",
)