SecureValue

class pyrogram.raw.types.SecureValue

Secure value

Constructor of SecureValue.

Details:
  • Layer: 227

  • 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
├── type → SecureValueType
│ ├── SecureValueTypePhone
│ └── SecureValueTypeEmail
├── data → SecureData (optional)
│ └── SecureData
│ ├── data → bytes
│ ├── data_hash → bytes
│ └── secret → bytes
├── front_side → SecureFile (optional)
│ ├── SecureFileEmpty
│ └── SecureFile
│ ├── id → long
│ ├── access_hash → long
│ ├── size → long
│ ├── dc_id → int
│ ├── date → int
│ ├── file_hash → bytes
│ └── secret → bytes
├── reverse_side → SecureFile (optional)
│ ├── SecureFileEmpty
│ └── SecureFile
│ ├── id → long
│ ├── access_hash → long
│ ├── size → long
│ ├── dc_id → int
│ ├── date → int
│ ├── file_hash → bytes
│ └── secret → bytes
├── selfie → SecureFile (optional)
│ ├── SecureFileEmpty
│ └── SecureFile
│ ├── id → long
│ ├── access_hash → long
│ ├── size → long
│ ├── dc_id → int
│ ├── date → int
│ ├── file_hash → bytes
│ └── secret → bytes
├── translation → Vector < SecureFile > (optional)
│ ├── SecureFileEmpty
│ └── SecureFile
│ ├── id → long
│ ├── access_hash → long
│ ├── size → long
│ ├── dc_id → int
│ ├── date → int
│ ├── file_hash → bytes
│ └── secret → bytes
├── files → Vector < SecureFile > (optional)
│ ├── SecureFileEmpty
│ └── SecureFile
│ ├── id → long
│ ├── access_hash → long
│ ├── size → long
│ ├── dc_id → int
│ ├── date → int
│ ├── file_hash → bytes
│ └── secret → bytes
├── plain_data → SecurePlainData (optional)
│ ├── SecurePlainPhone
│ │ └── phone → string
│ └── SecurePlainEmail
│ └── email → string
└── hash → bytes

Example

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