'Twilio phone call validation public numbers

I am using Twilio for the first time. It is implemented already, but I am trying to solidify the system.

My question is pretty simple. I would like to know if Twilio has integrated protections against trolls entering numbers such as 911-123-4567. I wouldn't want the company to get into troubles because someone decided to have the system make emergency calls on our name.

Otherwise, I could make an array of public numbers, for which, if the number given starts by said numbers, I throw an error.

Which one would be the best practice?

Thanks in advance!



Solution 1:[1]

Twilio doesn't have any automated blocks on dialling numbers. You might not want to call emergency numbers, for example, but some applications do.

You could certainly build your own blocklist for numbers you don't want your application to be able to call. Or for more security, your own allowlist.

One other option is verifying that the user owns the phone number that they are submitting, so that you know it is theirs. You could do this by implementing SMS or voice verification calls using the Twilio Verify API. It depends on your use case which of these three methods work with your use-case.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 philnash