import_authorization()

async Client.import_authorization()

Log in a user using an exported authorization key transmitted from another data center.

Usable by Users Bots
Parameters:
  • id (int) – User ID.

  • bytes (bytes) – Exported authorization key bytes.

Returns:

Authorization – The imported authorization object.

Example

auth = await app.import_authorization(user_id, exported_bytes)