how can I create a bulk sms code on twilio? Right now, I'm using Twilio Service api which can send up to 10k sms in 1 request. But I read that it only sends 1 sms per second so it means 10k messages means all will be sent after 3 hours.
Is it possible to do it like this on Twilio?
All of these should happen using Twilio API
- Can create/delete lists that will identify the phone #.
- Can add/delete phone numbers on the list.
- Can request twilio to trigger a notification which will only ask for the list id instead of looping all phone numbers (which is the current way I'm doing it).
Currently im doing it like this:
$to = array();
$x = 0;
$message = 'Test';
foreach($phone_numbers as $phone_number){
$to[$x] = '{"binding_type":"sms", "address":"'.$phone_number.'"}';
$x++;
}
$notification = $client
->notify->services($service_id)
->notifications->create([
"toBinding" => $to,
"body" => $message
]);
If the phone numbers are more than 10k, it will not send all of them.
is there a way to make it like this?
the phone numbers are not stored on the database but instead stored on a list in twilio database then you will only need to call that list to send a message
also i can add multiple list which will identify what the notification is for
ex.
list #1 name is Room 1
list #2 name is Room 2
list #1 has phone number a, phone number b
list #2 has phone number a, phone number c