Enroll Factor API for SMS: Invalid Phone Number

Hello,
I am trying to enroll a SMS factor for a user using the factor API, on my dev tenant.

I end up with the result “Api validation failed: factorEnrollRequest”.
The error cause is : “Invalid Phone Number.”

I am using the very phone number they put in the official Okta documentation for this API: “+1-555-415-1337” .

Do you know why I get this error message?

  1. is there a restriction on dev tenants ?
  2. is there a location where I can set the expected phone number format?

Thanks!

The phoneNumber used in our examples is just a placeholder, and it looks like we do not consider phone numbers that start with 555 (or any toll-free numbers like 888) as valid.

I was able to add the SMS factor for a user in my own dev org thats in the same format (+1-xxx-xxx-xxxx for US), but with a valid phone number (including area code). So be careful putting dummy or test numbers in here as our backend validation may reject!

Thanks, I tested, the standard implemented by okta is to remove any dash, and it worked.
I still don’t understand why the documentation shows an invalid format, but my problem is solved.

Thanks!