SecureValue

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

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.

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[source]

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[source]

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

Type:

telegram.FileCredentials

reverse_side[source]

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

Type:

telegram.FileCredentials

selfie[source]

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[source]

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[source]

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)[source]

See telegram.TelegramObject.de_json().