Skip to main content

account.getTmpPassword

Get temporary payment password

func (c *Client) AccountGetTmpPassword(ctx context.Context, request *AccountGetTmpPasswordRequest) (*AccountTmpPassword, error)

Calling this method

client.Run(ctx, func(ctx context.Context) error {
api := client.API()

res, err := api.AccountGetTmpPassword(ctx, &tg.AccountGetTmpPasswordRequest{
// see Parameters
})
if err != nil {
return err
}
_ = res // *AccountTmpPassword
return nil
})

Parameters

NameTypeRequiredDescription
PasswordInputCheckPasswordSRPClassyesSRP password parameters
PeriodintyesTime during which the temporary password will be valid, in seconds; should be between 60 and 86400

Returns

*AccountTmpPassword

Possible errors

CodeTypeDescription
400PASSWORD_HASH_INVALIDThe provided password hash is invalid.
400SRP_A_INVALIDThe specified inputCheckPasswordSRP.A value is invalid.
400TMP_PASSWORD_DISABLEDThe temporary password is disabled.

References