auth.acceptLoginToken
Accept QR code login token, logging in the app that generated it. Returns info about the new session. For more info, see login via QR code.
func (c *Client) AuthAcceptLoginToken(ctx context.Context, token []byte) (*Authorization, error)
Calling this method
client.Run(ctx, func(ctx context.Context) error {
api := client.API()
res, err := api.AuthAcceptLoginToken(ctx, token)
if err != nil {
return err
}
_ = res // *Authorization
return nil
})
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
Token | []byte | yes | Login token embedded in QR code, for more info, see login via QR code. |
Returns
Possible errors
| Code | Type | Description |
|---|---|---|
| 400 | AUTH_TOKEN_ALREADY_ACCEPTED | The specified auth token was already accepted. |
| 400 | AUTH_TOKEN_EXCEPTION | An error occurred while importing the auth token. |
| 400 | AUTH_TOKEN_EXPIRED | The authorization token has expired. |
| 400 | AUTH_TOKEN_INVALIDX | The specified auth token is invalid. |
References
- Official documentation
- Generated Go reference
- TL definition:
auth.acceptLoginToken#e894ad4d