Skip to main content

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

NameTypeRequiredDescription
PasswordInputCheckPasswordSRPClassyesThe account's password (see SRP)

Returns

AuthAuthorizationClass

Possible errors

CodeTypeDescription
500AUTH_KEY_UNSYNCHRONIZEDInternal error, please repeat the method call.
400PASSWORD_HASH_INVALIDThe provided password hash is invalid.
400SRP_ID_INVALIDInvalid SRP ID provided.
400SRP_PASSWORD_CHANGEDPassword has changed.

References