auth.importLoginToken
Login using a redirected login token, generated in case of DC mismatch during QR code login. For more info, see login via QR code.
func (c *Client) AuthImportLoginToken(ctx context.Context, token []byte) (AuthLoginTokenClass, error)
Calling this method
client.Run(ctx, func(ctx context.Context) error {
api := client.API()
res, err := api.AuthImportLoginToken(ctx, token)
if err != nil {
return err
}
_ = res // AuthLoginTokenClass
return nil
})
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
Token | []byte | yes | Login token |
Returns
Possible errors
| Code | Type | Description |
|---|---|---|
| 400 | AUTH_TOKEN_ALREADY_ACCEPTED | The specified auth token was already accepted. |
| 400 | AUTH_TOKEN_EXPIRED | The authorization token has expired. |
| 400 | AUTH_TOKEN_INVALID | The specified auth token is invalid. |
| 400 | AUTH_TOKEN_INVALIDX | The specified auth token is invalid. |
References
- Official documentation
- Generated Go reference
- TL definition:
auth.importLoginToken#95ac5ce4