Layer 227
AuthExportLoginToken
Generate a login token, for login via QR code. The generated login token should be encoded using base 64 url, then shown as a tg://login?token=base 64 encodedtoken deep link in the QR code.
method
Users
auth.exportLoginToken#b7e085fe api_id:int api_hash:string except_ids:Vector<long> = auth.LoginToken;
Parameters
| Name | Type | Description |
|---|---|---|
| ApiId | int | Application identifier (see. App configuration ) |
| ApiHash | string | Application identifier hash (see. App configuration ) |
| ExceptIds | Vector < long > | List of already logged-in user IDs, to prevent logging in twice with the same user |
Returns
auth.LoginTokenGogram Example
// AuthExportLoginToken - positional arguments result, err := client.AuthExportLoginToken(42, "Hello, World!", &tg.VectorLong{}) if err != nil { // handle error } // result is *tg.AuthLoginToken
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. |
| 500 | AUTH_RESTART | Restart the authorization process. |