Twilio doesn't allow a blocklist or whitelist for SMS/MMS functionality, so the best we can do is not reply to any phone numbers that aren't on a pre-approved list. This list, for privacy's sake, could be stored on a password-protected AWS S3 bucket, or even just an S3 file that's public but has an unguessable path/URI. Either way, the credentials for acting this list would need to be stored on Twilio Functions as environment variable secrets.
Twilio doesn't allow a blocklist or whitelist for SMS/MMS functionality, so the best we can do is not reply to any phone numbers that aren't on a pre-approved list. This list, for privacy's sake, could be stored on a password-protected AWS S3 bucket, or even just an S3 file that's public but has an unguessable path/URI. Either way, the credentials for acting this list would need to be stored on Twilio Functions as environment variable secrets.