The SMS length limitation varies when the country code changes. Here's how it works internally: the third-party library OSS is utilizing will first detect the first few digits for country code, and if detected, it will keep detecting area code if applicable, and finally check rest digits against the format. So when the country code is clear, the length should be fixed, for example:
A particular canadian number, the standard format is: starting with "1", following with 3 digits area code, then 7 digits number. If you input as "15141234567", (514 is montreal area code), no shorter or longer digits are acceptable.
If it's a format error like unrecognized country code, or wrong length if country code is recognizable, you can expect the API to return an 400 error for such validations:
(The "message" may not reflect the real issue though)
However, if it only failed when delivering the text messages, I'm afraid there's no specific callback for this event for now. The callback event which matches this scenario the most might be the "Recipient locked", which gets triggered when the signer failed to validate for too many times.
Reply to: SMS authentication
Wednesday, September 2, 2015 at 06:27pmReply to: SMS authentication
Wednesday, September 2, 2015 at 06:35pmReply to: HeyRexWhenyous
Monday, June 15, 2020 at 03:58amHi, Michael
Thanks for the solution,
is there any restriction on the length of the mobile phone number?
As different countries around the world have different formats for their phone numbers. so how to handle this?
Regards,
Madeva
Reply to: HeyRexWhenyous
Monday, June 15, 2020 at 03:59amSorry for the multiple posts, due to the bad network caused multiple posts.
Regards,
Madeva
Reply to: SMS authentication
Monday, June 15, 2020 at 11:05amHi Madeva,
The SMS length limitation varies when the country code changes. Here's how it works internally: the third-party library OSS is utilizing will first detect the first few digits for country code, and if detected, it will keep detecting area code if applicable, and finally check rest digits against the format. So when the country code is clear, the length should be fixed, for example:
A particular canadian number, the standard format is: starting with "1", following with 3 digits area code, then 7 digits number. If you input as "15141234567", (514 is montreal area code), no shorter or longer digits are acceptable.
Duo
Reply to: Hi Madeva, The SMS…
Tuesday, June 23, 2020 at 08:04amHi Duo,
Thanks for the reply,
I need to understand how to handle when we give an invalid mobile number while the configuration of 2 factor SMS authentication!
do we have an event to track that?
Regards,
Madeva
Reply to: SMS authentication
Tuesday, June 23, 2020 at 08:52amHi Madeva,
If it's a format error like unrecognized country code, or wrong length if country code is recognizable, you can expect the API to return an 400 error for such validations:
{
"messageKey": "error.validation.invalidPhoneNumber",
"message": "TOO_LONG",
"code": 400
}
(The "message" may not reflect the real issue though)
However, if it only failed when delivering the text messages, I'm afraid there's no specific callback for this event for now. The callback event which matches this scenario the most might be the "Recipient locked", which gets triggered when the signer failed to validate for too many times.
Duo
Reply to: HeyRexWhenyous
Monday, October 5, 2020 at 04:58pmHi Michael! Thanks for your answer!
What if I wanted to authenticate using a certificate, what would be the scheme name?
Thank you!
Reply to: HeyRexWhenyous
Monday, October 5, 2020 at 05:00pmHi Michael! Thanks for your answer!
What if I wanted to authenticate using a certificate, what would be the scheme name?
Thank you!