How can I send an sms challenge to the phone number given while enrolling to the factor using Okta Java API? My code is as follows:
Client client = Clients.builder()
.setOrgUrl(hostname)
.setClientCredentials(new TokenClientCredentials(apikey))
.build();
User user = client.getUser(email);
FactorList factors = user.listFactors();
Factor factor = null;
for (Factor f : factors) {
if (f.getFactorType().toString().equals(authFactor)) {
factor = f;
}
}
if (factor != null && factor.getStatus().toString().equalsIgnoreCase("active")) {
VerifyFactorRequest verifyFactorRequest = client.instantiate(VerifyFactorRequest.class);
// send sms challenge
}