Twilio Error "From phone number is not valid (Code: 21606)"

Problem statement

Twilio has been configured as the SMS messaging provider within a tenant. When sending a Passwordless message to the phone number of the user, a Twilio error code is encountered.

The From phone number +44XXXXX456 is not a valid, SMS-capable inbound phone number or short code for your account. (Code: 21606)

This only happens when that same phone number is listed in the MFA factors.

Solution

SMS messages can only be sent from a phone number provided by Twilio, and that phone number must be SMS enabled. Here are some troubleshooting tips to determine common types of configuration problems:

  • Review the Twilio troubleshooting guidance about this error. For more information, refer to ERROR:21606
  • Check that the From number does not correspond to the “Magic Number” +15005550006 that is used for testing Twilio. For more information, refer to Magic Phone Numbers . If it is a test number, it is not SMS-capable for inbound messages.
  • If that does not solve the problem, compare the SMS connection and the MFA SMS configuration. Check whether the phone number is the same, but the Twilio ID (SID) is different:
    • Login to the Auth0 dashboard.
    • Navigate Authentication > Passwordless.
    • Click SMS.
    • A dialogue box appears: make a note of the Twilio SID.
    • Navigate to Security > Multi-factor Auth.
    • Click Phone Message.
    • Make a note of the Twilio SID.
    • Confirm whether both share the same Phone Number but the Twilio ID (SID) is different. If that is true, then update the SMS connection to use the same SID as the MFA configuration; it should resolve the problem. For more information, refer to Twilio Configuration.
  • Check the Twilio console to see whether the SID and the list of Verified Caller IDs are tied to a single account. If that is not the case then two accounts may be in use, with the result that the Verified Caller number does not match up with the SID.

If none of the suggested troubleshooting steps help, then there may be a problem with the number itself. Contact Twilio support for further advice.

Related References