auth.checkPassword
Try logging to an account protected by a 2FA password.
func (c *Client) AuthCheckPassword(ctx context.Context, password InputCheckPasswordSRPClass) (AuthAuthorizationClass, error)
Calling this method
client.Run(ctx, func(ctx context.Context) error {
api := client.API()
res, err := api.AuthCheckPassword(ctx, password)
if err != nil {
return err
}
_ = res // AuthAuthorizationClass
return nil
})
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
Password | InputCheckPasswordSRPClass | yes | The account's password (see SRP) |
Returns
Possible errors
| Code | Type | Description |
|---|---|---|
| 500 | AUTH_KEY_UNSYNCHRONIZED | Internal error, please repeat the method call. |
| 400 | PASSWORD_HASH_INVALID | The provided password hash is invalid. |
| 400 | SRP_ID_INVALID | Invalid SRP ID provided. |
| 400 | SRP_PASSWORD_CHANGED | Password has changed. |
References
- Official documentation
- Generated Go reference
- TL definition:
auth.checkPassword#d18b4d16