Hide navigation sidebar
Hide table of contents sidebar
Skip to content
Back to top
View this page
Toggle table of contents sidebar

# SecureValue

class telegram.SecureValue(data=None, front_side=None, reverse_side=None, selfie=None, files=None, translation=None, *, api_kwargs=None)

  Bases: `telegram.TelegramObject`

  This object represents the credentials that were used to decrypt the encrypted value. All fields are optional and depend on the type of field.

  Available In

  - `telegram.SecureData.address`

  - `telegram.SecureData.bank_statement`

  - `telegram.SecureData.driver_license`

  - `telegram.SecureData.identity_card`

  - `telegram.SecureData.internal_passport`

  - `telegram.SecureData.passport_registration`

  - `telegram.SecureData.passport`

  - `telegram.SecureData.personal_details`

  - `telegram.SecureData.rental_agreement`

  - `telegram.SecureData.temporary_registration`

  - `telegram.SecureData.utility_bill`

  Parameters:

    - data (`telegram.DataCredentials`, optional) – Credentials for encrypted Telegram Passport data. Available for “personal_details”, “passport”, “driver_license”, “identity_card”, “identity_passport” and “address” types.

    - front_side (`telegram.FileCredentials`, optional) – Credentials for encrypted document’s front side. Available for “passport”, “driver_license”, “identity_card” and “internal_passport”.

    - reverse_side (`telegram.FileCredentials`, optional) – Credentials for encrypted document’s reverse side. Available for “driver_license” and “identity_card”.

    - selfie (`telegram.FileCredentials`, optional) – Credentials for encrypted selfie of the user with a document. Can be available for “passport”, “driver_license”, “identity_card” and “internal_passport”.

    - translation (list[`telegram.FileCredentials`], optional) – Credentials for an encrypted translation of the document. Available for “passport”, “driver_license”, “identity_card”, “internal_passport”, “utility_bill”, “bank_statement”, “rental_agreement”, “passport_registration” and “temporary_registration”.

    - files (list[`telegram.FileCredentials`], optional) – Credentials for encrypted files. Available for “utility_bill”, “bank_statement”, “rental_agreement”, “passport_registration” and “temporary_registration” types.

  data

    Optional. Credentials for encrypted Telegram Passport data. Available for “personal_details”, “passport”, “driver_license”, “identity_card”, “identity_passport” and “address” types.

    Type:

      `telegram.DataCredentials`

  front_side

    Optional. Credentials for encrypted document’s front side. Available for “passport”, “driver_license”, “identity_card” and “internal_passport”.

    Type:

      `telegram.FileCredentials`

  reverse_side

    Optional. Credentials for encrypted document’s reverse side. Available for “driver_license” and “identity_card”.

    Type:

      `telegram.FileCredentials`

  selfie

    Optional. Credentials for encrypted selfie of the user with a document. Can be available for “passport”, “driver_license”, “identity_card” and “internal_passport”.

    Type:

      `telegram.FileCredentials`

  translation

    Optional. Credentials for an encrypted translation of the document. Available for “passport”, “driver_license”, “identity_card”, “internal_passport”, “utility_bill”, “bank_statement”, “rental_agreement”, “passport_registration” and “temporary_registration”.

    Changed in version 20.0: This attribute is now an immutable tuple.

    Type:

      tuple[`telegram.FileCredentials`]

  files

    Optional. Credentials for encrypted files. Available for “utility_bill”, “bank_statement”, “rental_agreement”, “passport_registration” and “temporary_registration” types.

    Changed in version 20.0:

    - This attribute is now an immutable tuple.

    - This attribute is now always a tuple, that may be empty.

    Type:

      tuple[`telegram.FileCredentials`]

  classmethod de_json(data, bot=None)

    See `telegram.TelegramObject.de_json()`.