auth.exportLoginToken

Generate a login token, for login via QR code.
The generated login token should be encoded using base64url, then shown as a tg://login?token=base64encodedtoken deep link » in the QR code.

For more info, see login via QR code.

 Method schema is available as of layer 133. Switch »

Parameters

Name Type Description
api_id int Application identifier (see. App configuration)
api_hash string Application identifier hash (see. App configuration)
except_ids Vector<long> List of already logged-in user IDs, to prevent logging in twice with the same user

Result

auth.LoginToken

Possible errors

Code Type Description
400 API_ID_INVALID API ID invalid.
400 API_ID_PUBLISHED_FLOOD This API id was published somewhere, you can't use it now.

Related pages

Login via QR code

QR code login flow

Deep links

Telegram clients must handle special tg:// and t.me deep links encountered in messages, link entities and in other apps by registering OS handlers.