ImportLoginTokenRequest
Only users can use this request. See code examples.
---functions--- auth.importLoginToken#95ac5ce4 token:bytes = auth.LoginToken
Returns
auth.LoginToken |
This type can be an instance of either:
LoginToken | LoginTokenMigrateTo |
LoginTokenSuccess |
Parameters
token | bytes |
Known RPC errors
This request can cause 3 known errors:
AuthTokenAlreadyAcceptedError | The authorization token was already used. |
AuthTokenExpiredError | The provided authorization token has expired and the updated QR-code must be re-scanned. |
AuthTokenInvalidError | An invalid authorization token was provided. |
You can import these from telethon.errors
.
Example
from telethon.sync import TelegramClient from telethon import functions, types with TelegramClient(name, api_id, api_hash) as client: result = client(functions.auth.ImportLoginTokenRequest( token=b'arbitrary\x7f data \xfa here' )) print(result.stringify())