telegram.PassportData¶
-
class
telegram.PassportData(data: List[telegram.passport.encryptedpassportelement.EncryptedPassportElement], credentials: telegram.passport.credentials.EncryptedCredentials, bot: Bot = None, **_kwargs)¶ Bases:
telegram.base.TelegramObjectContains information about Telegram Passport data shared with the bot by the user.
Note
To be able to decrypt this object, you must pass your
private_keyto eithertelegram.Updaterortelegram.Bot. Decrypted data is then found indecrypted_dataand the payload can be found indecrypted_credentials’s attributetelegram.Credentials.payload.Parameters: - data (List[
telegram.EncryptedPassportElement]) – Array with encrypted information about documents and other Telegram Passport elements that was shared with the bot. - credentials (
telegram.EncryptedCredentials)) – Encrypted credentials. - bot (
telegram.Bot, optional) – The Bot to use for instance methods. - **kwargs (
dict) – Arbitrary keyword arguments.
-
data¶ Array with encrypted information about documents and other Telegram Passport elements that was shared with the bot.
Type: List[ telegram.EncryptedPassportElement]
-
credentials¶ Encrypted credentials.
Type: telegram.EncryptedCredentials
-
bot¶ The Bot to use for instance methods.
Type: telegram.Bot, optional
-
decrypted_credentials¶ - Lazily decrypt and return credentials that were used
- to decrypt the data. This object also contains the user specified payload as decrypted_data.payload.
Raises: telegram.TelegramDecryptionError– Decryption failed. Usually due to bad private/public key but can also suggest malformed/tampered data.Type: telegram.Credentials
-
decrypted_data¶ - Lazily decrypt and return information
- about documents and other Telegram Passport elements which were shared with the bot.
Raises: telegram.TelegramDecryptionError– Decryption failed. Usually due to bad private/public key but can also suggest malformed/tampered data.Type: List[ telegram.EncryptedPassportElement]
- data (List[