account.AcceptAuthorization

class pyrogram.raw.functions.account.AcceptAuthorization

Sends a Telegram Passport authorization form, effectively sharing data with the service

Details:
  • Layer: 223

  • ID: F3ED4C73

Parameters:
  • bot_id (int 64-bit) – Bot ID

  • scope (str) – Telegram Passport element types requested by the service

  • public_key (str) – Service’s public key

  • value_hashes (List of SecureValueHash) – Types of values sent and their hashes

  • credentials (SecureCredentialsEncrypted) – Encrypted values

Returns:

bool

TL Schema

account.acceptAuthorization#f3ed4c73
bot_id:long
scope:string
public_key:string
value_hashes:Vector<SecureValueHash>
credentials:SecureCredentialsEncrypted

= Bool

Parameter Tree

AcceptAuthorization
├── bot_idlong
├── scopestring
├── public_keystring
├── value_hashesVector < SecureValueHash >
│ └── SecureValueHash
│ ├── typeSecureValueType
│ │ ├── SecureValueTypePassport
│ │ ├── SecureValueTypeIdentityCard
│ │ ├── SecureValueTypeAddress
│ │ ├── SecureValueTypeUtilityBill
│ │ ├── SecureValueTypePhone
│ │ └── SecureValueTypeEmail
│ └── hashbytes
└── credentialsSecureCredentialsEncrypted
├── databytes
├── hashbytes
└── secretbytes

Example

await app.invoke(
    AcceptAuthorization(
        bot_id=0,
        scope="text",
        public_key="text",
        value_hashes=[
                SecureValueHash(
                    type=SecureValueTypePersonalDetails(),
                    hash=b"data"
                )
            ],
        credentials=SecureCredentialsEncrypted(
            data=b"data",
            hash=b"data",
            secret=b"data"
        ),
    )
)