Long numbers
jcardus opened this issue · 5 comments
I'm having Bad request using this number:
+345906566798696
Is it too long?
Hello!
According to the information available on Wikipedia, the maximum length of a telephone number in Spain, including the country code, is 11 digits. The number you've provided, +345906566798696
, exceeds this limit and therefore appears to be incorrect.
If you are confident that the number is correct, could you please provide any additional information about this phone number's format? Sometimes, phone numbers may include extra digits for various reasons, such as extensions or calling through certain carriers, but these are typically not part of the standard phone number.
Please double-check the number and ensure that it adheres to the standard format.
Thanks!
The number is correct.
It's from a m2m simcard from this provider.
It's working in Spain, if you send a message to that number it receives.
Hello!
I've been thinking about the situation with the non-standard phone numbers you're dealing with. What I can do is add an option to the API that allows you to disable phone number validation. This way you can bypass the check. But just a heads up, with validation turned off, you'll need to make sure the numbers are clean, starting with a +
and followed only by digits, in line with the E.164 format.
It'll take a little bit of time for me to update both the client and server parts of the app to make this happen. I'll definitely let you know as soon as the updates are up and ready for you to use.
Thanks!
Hello Aleksander,
Thank you very much, if I can help with a PR please let me know.
Hello!
I've implemented the feature to disable phone number validation that we discussed. A test version is now available for you to try out. You can download it from the following link: https://github.com/capcom6/android-sms-gateway/releases/tag/v1.6.1
To disable phone number validation, please append the query parameter skipPhoneValidation=true
to your API requests. For example, POST /3rdparty/v1/message?skipPhoneValidation=true
.
I would appreciate it if you could test this new feature and let me know if it works as you expected.
Thanks!