twilio / twilio-node

Node.js helper library
MIT License
1.37k stars 495 forks source link

Getting error "Phone number is invalid." when trying to create a Sole Proprietor A2P brand #957

Closed bradleyy1012 closed 8 months ago

bradleyy1012 commented 9 months ago

Issue Summary

I am trying to create a Sole Proprietor A2P brand by following this guide: https://www.twilio.com/docs/sms/a2p-10dlc/onboarding-isv-api-sole-prop-new For the profile evaluation in step 1.7 it says for the phone number field that "Phone number is invalid." The exact error is:

{
object_field: 'phone_number',
error_code: 22218,
friendly_name: 'Phone Number',
passed: false,
failure_reason: 'Phone number is invalid.'
}

The phone number I'm using is a valid mobile phone number registered to T-Mobile. It is in the format of +17205551234 (just an example) When I lookup the phone number using Twilio Lookup, it confirms this, and even has the exact same registered name as the information I'm submitting in step 1.3.

Things that make it work:

Steps to Reproduce

  1. Follow the guide here: https://www.twilio.com/docs/sms/a2p-10dlc/onboarding-isv-api-sole-prop-new
  2. Run the profile evaluation in step 1.7.
  3. If you used the same phone number that my end-user is using, it consistently won't work. I cannot post the end-users phone number here, but it is in twilio support ticket 13513218.

Technical details:

bradleyy1012 commented 8 months ago

After further investigation, I found out it was because I was submitting the phone number in the format of 555-555-5555, when it should have been 5555555555. This was hard to track because it allows other phone numbers to have the format of 555-555-5555, but not certain phone numbers. I'm not sure why twilio would allow this to work for some phone numbers and not others, but it is what it is.