@Override
public void register(
- boolean voiceVerification, String captcha, final boolean forceRegister
+ boolean voiceVerification,
+ String captcha,
+ final boolean forceRegister
) throws IOException, CaptchaRequiredException, NonNormalizedPhoneNumberException, RateLimitException, VerificationMethodNotAvailableException {
if (account.isRegistered()
&& account.getServiceEnvironment() != null
@Override
public void verifyAccount(
- String verificationCode, String pin
+ String verificationCode,
+ String pin
) throws IOException, PinLockedException, IncorrectPinException {
if (account.isRegistered()) {
throw new IOException("Account is already registered");
) throws IOException {
final var registrationApi = unauthenticatedAccountManager.getRegistrationApi();
try {
- Utils.handleResponseException(registrationApi.verifyAccount(verificationCode, sessionId));
+ Utils.handleResponseException(registrationApi.verifyAccount(sessionId, verificationCode));
} catch (AlreadyVerifiedException e) {
// Already verified so can continue registering
}