SecureValue

class pyrogram.raw.base.SecureValue

Secure Telegram Passport value

Constructors:

This base type has 1 constructor available.

SecureValue

Secure value

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(),
    data=SecureData(
        data=b"data",
        data_hash=b"data",
        secret=b"data"
    ),
    front_side=SecureFileEmpty(),
    reverse_side=SecureFileEmpty(),
    selfie=SecureFileEmpty(),
    translation=[
            SecureFileEmpty()
        ],
    files=[
            SecureFileEmpty()
        ],
    plain_data=SecurePlainPhone(phone="+1234567890"),
    hash=b"data",
)