account.AuthorizationForm

class pyrogram.raw.types.account.AuthorizationForm

Telegram Passport authorization form

Constructor of AuthorizationForm.

Details:
  • Layer: 223

  • ID: AD2E1CD8

Parameters:
  • required_types (List of SecureRequiredType) – Required Telegram Passport documents

  • values (List of SecureValue) – Already submitted Telegram Passport documents

  • errors (List of SecureValueError) – Telegram Passport errors

  • users (List of User) – Info about the bot to which the form will be submitted

  • privacy_policy_url (str, optional) – URL of the service’s privacy policy

Functions:

This object can be returned by 1 function.

account.GetAuthorizationForm

Returns a Telegram Passport authorization form for sharing data with a service

TL Schema

account.authorizationForm#ad2e1cd8
flags:#
required_types:Vector<SecureRequiredType>
values:Vector<SecureValue>
errors:Vector<SecureValueError>
users:Vector<User>
privacy_policy_url:flags.0?string

= account.AuthorizationForm

Parameter Tree

AuthorizationForm
├── required_typesVector < SecureRequiredType >
│ ├── SecureRequiredType
│ │ ├── native_namestrue (optional)
│ │ ├── selfie_requiredtrue (optional)
│ │ ├── translation_requiredtrue (optional)
│ │ └── typeSecureValueType
│ │ ├── SecureValueTypePassport
│ │ ├── SecureValueTypeIdentityCard
│ │ ├── SecureValueTypeAddress
│ │ ├── SecureValueTypeUtilityBill
│ │ ├── SecureValueTypePhone
│ │ └── SecureValueTypeEmail
│ └── typesVector < SecureRequiredType >
│ ├── SecureRequiredType
│ │ ├── native_namestrue (optional)
│ │ ├── selfie_requiredtrue (optional)
│ │ ├── translation_requiredtrue (optional)
│ │ └── typeSecureValueType
│ │ ├── SecureValueTypePassport
│ │ ├── SecureValueTypeIdentityCard
│ │ ├── SecureValueTypeAddress
│ │ ├── SecureValueTypeUtilityBill
│ │ ├── SecureValueTypePhone
│ │ └── SecureValueTypeEmail
│ └── typesVector < SecureRequiredType >
│ ├── SecureRequiredType
├── valuesVector < SecureValue >
│ └── SecureValue
│ ├── typeSecureValueType
│ │ ├── SecureValueTypePassport
│ │ ├── SecureValueTypeIdentityCard
│ │ ├── SecureValueTypeAddress
│ │ ├── SecureValueTypeUtilityBill
│ │ ├── SecureValueTypePhone
│ │ └── SecureValueTypeEmail
│ ├── dataSecureData (optional)
│ │ └── SecureData
│ │ ├── databytes
│ │ ├── data_hashbytes
│ │ └── secretbytes
│ ├── front_sideSecureFile (optional)
│ │ ├── SecureFileEmpty
│ │ └── SecureFile
│ │ ├── idlong
│ │ ├── access_hashlong
│ │ ├── sizelong
│ │ ├── dc_idint
│ │ ├── dateint
│ │ ├── file_hashbytes
│ │ └── secretbytes
│ ├── reverse_sideSecureFile (optional)
│ │ ├── SecureFileEmpty
│ │ └── SecureFile
│ │ ├── idlong
│ │ ├── access_hashlong
│ │ ├── sizelong
│ │ ├── dc_idint
│ │ ├── dateint
│ │ ├── file_hashbytes
│ │ └── secretbytes
│ ├── selfieSecureFile (optional)
│ │ ├── SecureFileEmpty
│ │ └── SecureFile
│ │ ├── idlong
│ │ ├── access_hashlong
│ │ ├── sizelong
│ │ ├── dc_idint
│ │ ├── dateint
│ │ ├── file_hashbytes
│ │ └── secretbytes
│ ├── translationVector < SecureFile > (optional)
│ │ ├── SecureFileEmpty
│ │ └── SecureFile
│ │ ├── idlong
│ │ ├── access_hashlong
│ │ ├── sizelong
│ │ ├── dc_idint
│ │ ├── dateint
│ │ ├── file_hashbytes
│ │ └── secretbytes
│ ├── filesVector < SecureFile > (optional)
│ │ ├── SecureFileEmpty
│ │ └── SecureFile
│ │ ├── idlong
│ │ ├── access_hashlong
│ │ ├── sizelong
│ │ ├── dc_idint
│ │ ├── dateint
│ │ ├── file_hashbytes
│ │ └── secretbytes
│ ├── plain_dataSecurePlainData (optional)
│ │ ├── SecurePlainPhone
│ │ │ └── phonestring
│ │ └── SecurePlainEmail
│ │ └── emailstring
│ └── hashbytes
├── errorsVector < SecureValueError >
│ ├── SecureValueErrorData
│ │ ├── typeSecureValueType
│ │ │ ├── SecureValueTypePersonalDetails
│ │ │ ├── SecureValueTypePassport
│ │ │ ├── SecureValueTypeDriverLicense
│ │ │ ├── SecureValueTypeIdentityCard
│ │ │ ├── SecureValueTypeInternalPassport
│ │ │ ├── SecureValueTypeAddress
│ │ │ ├── SecureValueTypeUtilityBill
│ │ │ ├── SecureValueTypeBankStatement
│ │ │ ├── SecureValueTypeRentalAgreement
│ │ │ ├── SecureValueTypePhone
│ │ │ └── SecureValueTypeEmail
│ │ ├── data_hashbytes
│ │ ├── fieldstring
│ │ └── textstring
│ │ ├── typeSecureValueType
│ │ │ ├── SecureValueTypePersonalDetails
│ │ │ ├── SecureValueTypePassport
│ │ │ ├── SecureValueTypeDriverLicense
│ │ │ ├── SecureValueTypeIdentityCard
│ │ │ ├── SecureValueTypeInternalPassport
│ │ │ ├── SecureValueTypeAddress
│ │ │ ├── SecureValueTypeUtilityBill
│ │ │ ├── SecureValueTypeBankStatement
│ │ │ ├── SecureValueTypeRentalAgreement
│ │ │ ├── SecureValueTypePhone
│ │ │ └── SecureValueTypeEmail
│ │ ├── file_hashbytes
│ │ └── textstring
│ │ ├── typeSecureValueType
│ │ │ ├── SecureValueTypePersonalDetails
│ │ │ ├── SecureValueTypePassport
│ │ │ ├── SecureValueTypeDriverLicense
│ │ │ ├── SecureValueTypeIdentityCard
│ │ │ ├── SecureValueTypeInternalPassport
│ │ │ ├── SecureValueTypeAddress
│ │ │ ├── SecureValueTypeUtilityBill
│ │ │ ├── SecureValueTypeBankStatement
│ │ │ ├── SecureValueTypeRentalAgreement
│ │ │ ├── SecureValueTypePhone
│ │ │ └── SecureValueTypeEmail
│ │ ├── file_hashbytes
│ │ └── textstring
│ │ ├── typeSecureValueType
│ │ │ ├── SecureValueTypePersonalDetails
│ │ │ ├── SecureValueTypePassport
│ │ │ ├── SecureValueTypeDriverLicense
│ │ │ ├── SecureValueTypeIdentityCard
│ │ │ ├── SecureValueTypeInternalPassport
│ │ │ ├── SecureValueTypeAddress
│ │ │ ├── SecureValueTypeUtilityBill
│ │ │ ├── SecureValueTypeBankStatement
│ │ │ ├── SecureValueTypeRentalAgreement
│ │ │ ├── SecureValueTypePhone
│ │ │ └── SecureValueTypeEmail
│ │ ├── file_hashbytes
│ │ └── textstring
│ ├── SecureValueErrorFile
│ │ ├── typeSecureValueType
│ │ │ ├── SecureValueTypePersonalDetails
│ │ │ ├── SecureValueTypePassport
│ │ │ ├── SecureValueTypeDriverLicense
│ │ │ ├── SecureValueTypeIdentityCard
│ │ │ ├── SecureValueTypeInternalPassport
│ │ │ ├── SecureValueTypeAddress
│ │ │ ├── SecureValueTypeUtilityBill
│ │ │ ├── SecureValueTypeBankStatement
│ │ │ ├── SecureValueTypeRentalAgreement
│ │ │ ├── SecureValueTypePhone
│ │ │ └── SecureValueTypeEmail
│ │ ├── file_hashbytes
│ │ └── textstring
│ ├── SecureValueErrorFiles
│ │ ├── typeSecureValueType
│ │ │ ├── SecureValueTypePersonalDetails
│ │ │ ├── SecureValueTypePassport
│ │ │ ├── SecureValueTypeDriverLicense
│ │ │ ├── SecureValueTypeIdentityCard
│ │ │ ├── SecureValueTypeInternalPassport
│ │ │ ├── SecureValueTypeAddress
│ │ │ ├── SecureValueTypeUtilityBill
│ │ │ ├── SecureValueTypeBankStatement
│ │ │ ├── SecureValueTypeRentalAgreement
│ │ │ ├── SecureValueTypePhone
│ │ │ └── SecureValueTypeEmail
│ │ ├── file_hashVector < bytes >
│ │ └── textstring
│ ├── SecureValueError
│ │ ├── typeSecureValueType
│ │ │ ├── SecureValueTypePersonalDetails
│ │ │ ├── SecureValueTypePassport
│ │ │ ├── SecureValueTypeDriverLicense
│ │ │ ├── SecureValueTypeIdentityCard
│ │ │ ├── SecureValueTypeInternalPassport
│ │ │ ├── SecureValueTypeAddress
│ │ │ ├── SecureValueTypeUtilityBill
│ │ │ ├── SecureValueTypeBankStatement
│ │ │ ├── SecureValueTypeRentalAgreement
│ │ │ ├── SecureValueTypePhone
│ │ │ └── SecureValueTypeEmail
│ │ ├── hashbytes
│ │ └── textstring
│ │ ├── typeSecureValueType
│ │ │ ├── SecureValueTypePersonalDetails
│ │ │ ├── SecureValueTypePassport
│ │ │ ├── SecureValueTypeDriverLicense
│ │ │ ├── SecureValueTypeIdentityCard
│ │ │ ├── SecureValueTypeInternalPassport
│ │ │ ├── SecureValueTypeAddress
│ │ │ ├── SecureValueTypeUtilityBill
│ │ │ ├── SecureValueTypeBankStatement
│ │ │ ├── SecureValueTypeRentalAgreement
│ │ │ ├── SecureValueTypePhone
│ │ │ └── SecureValueTypeEmail
│ │ ├── file_hashbytes
│ │ └── textstring
│ ├── typeSecureValueType
│ │ ├── SecureValueTypePassport
│ │ ├── SecureValueTypeIdentityCard
│ │ ├── SecureValueTypeAddress
│ │ ├── SecureValueTypeUtilityBill
│ │ ├── SecureValueTypePhone
│ │ └── SecureValueTypeEmail
│ ├── file_hashVector < bytes >
│ └── textstring
├── usersVector < User >
│ ├── UserEmpty
│ │ └── idlong
│ └── User
│ ├── is_selftrue (optional)
│ ├── contacttrue (optional)
│ ├── mutual_contacttrue (optional)
│ ├── deletedtrue (optional)
│ ├── bottrue (optional)
│ ├── bot_chat_historytrue (optional)
│ ├── bot_nochatstrue (optional)
│ ├── verifiedtrue (optional)
│ ├── restrictedtrue (optional)
│ ├── mintrue (optional)
│ ├── bot_inline_geotrue (optional)
│ ├── supporttrue (optional)
│ ├── scamtrue (optional)
│ ├── apply_min_phototrue (optional)
│ ├── faketrue (optional)
│ ├── bot_attach_menutrue (optional)
│ ├── premiumtrue (optional)
│ ├── attach_menu_enabledtrue (optional)
│ ├── bot_can_edittrue (optional)
│ ├── close_friendtrue (optional)
│ ├── stories_hiddentrue (optional)
│ ├── stories_unavailabletrue (optional)
│ ├── contact_require_premiumtrue (optional)
│ ├── bot_businesstrue (optional)
│ ├── bot_has_main_apptrue (optional)
│ ├── bot_forum_viewtrue (optional)
│ ├── bot_forum_can_manage_topicstrue (optional)
│ ├── idlong
│ ├── access_hashlong (optional)
│ ├── first_namestring (optional)
│ ├── last_namestring (optional)
│ ├── usernamestring (optional)
│ ├── phonestring (optional)
│ ├── photoUserProfilePhoto (optional)
│ │ ├── UserProfilePhotoEmpty
│ │ └── UserProfilePhoto
│ │ ├── has_videotrue (optional)
│ │ ├── personaltrue (optional)
│ │ ├── photo_idlong
│ │ ├── stripped_thumbbytes (optional)
│ │ └── dc_idint
│ ├── statusUserStatus (optional)
│ │ ├── UserStatusEmpty
│ │ ├── UserStatusOnline
│ │ │ └── expiresint
│ │ ├── UserStatusOffline
│ │ │ └── was_onlineint
│ │ ├── UserStatusRecently
│ │ │ └── by_metrue (optional)
│ │ ├── UserStatusLastWeek
│ │ │ └── by_metrue (optional)
│ │ └── UserStatusLastMonth
│ │ └── by_metrue (optional)
│ ├── bot_info_versionint (optional)
│ ├── restriction_reasonVector < RestrictionReason > (optional)
│ │ └── RestrictionReason
│ │ ├── platformstring
│ │ ├── reasonstring
│ │ └── textstring
│ ├── bot_inline_placeholderstring (optional)
│ ├── lang_codestring (optional)
│ ├── emoji_statusEmojiStatus (optional)
│ │ ├── EmojiStatusEmpty
│ │ ├── EmojiStatus
│ │ │ ├── document_idlong
│ │ │ └── untilint (optional)
│ │ ├── EmojiStatusCollectible
│ │ │ ├── collectible_idlong
│ │ │ ├── document_idlong
│ │ │ ├── titlestring
│ │ │ ├── slugstring
│ │ │ ├── pattern_document_idlong
│ │ │ ├── center_colorint
│ │ │ ├── edge_colorint
│ │ │ ├── pattern_colorint
│ │ │ ├── text_colorint
│ │ │ └── untilint (optional)
│ │ └── InputEmojiStatusCollectible
│ │ ├── collectible_idlong
│ │ └── untilint (optional)
│ ├── usernamesVector < Username > (optional)
│ │ └── Username
│ │ ├── editabletrue (optional)
│ │ ├── activetrue (optional)
│ │ └── usernamestring
│ ├── stories_max_idRecentStory (optional)
│ │ └── RecentStory
│ │ ├── livetrue (optional)
│ │ └── max_idint (optional)
│ ├── colorPeerColor (optional)
│ │ ├── PeerColor
│ │ │ ├── colorint (optional)
│ │ │ └── background_emoji_idlong (optional)
│ │ ├── PeerColorCollectible
│ │ │ ├── collectible_idlong
│ │ │ ├── gift_emoji_idlong
│ │ │ ├── background_emoji_idlong
│ │ │ ├── accent_colorint
│ │ │ ├── colorsVector < int >
│ │ │ ├── dark_accent_colorint (optional)
│ │ │ └── dark_colorsVector < int > (optional)
│ │ └── InputPeerColorCollectible
│ │ └── collectible_idlong
│ ├── profile_colorPeerColor (optional)
│ │ ├── PeerColor
│ │ │ ├── colorint (optional)
│ │ │ └── background_emoji_idlong (optional)
│ │ ├── PeerColorCollectible
│ │ │ ├── collectible_idlong
│ │ │ ├── gift_emoji_idlong
│ │ │ ├── background_emoji_idlong
│ │ │ ├── accent_colorint
│ │ │ ├── colorsVector < int >
│ │ │ ├── dark_accent_colorint (optional)
│ │ │ └── dark_colorsVector < int > (optional)
│ │ └── InputPeerColorCollectible
│ │ └── collectible_idlong
│ ├── bot_active_usersint (optional)
│ ├── bot_verification_iconlong (optional)
│ └── send_paid_messages_starslong (optional)
└── privacy_policy_urlstring (optional)

Example

AuthorizationForm(
    required_types=[
            SecureRequiredType(type=SecureValueTypePersonalDetails())
        ],
    values=[
            SecureValue(
                type=SecureValueTypePersonalDetails(),
                hash=b"data"
            )
        ],
    errors=[
            SecureValueErrorData(
                type=SecureValueTypePersonalDetails(),
                data_hash=b"data",
                field="text",
                text="Open"
            )
        ],
    users=[
            UserEmpty(id=0)
        ],
)