Search code examples
twiliosmstwilio-apitwilio-twiml

Given Twilio states 1 sms per second - do I need to modify my bulk sending sms function? - Django


On their pricing page Twilio states one sms per second for "clean local numbers". Does this mean I cannot send more than one sms per second for that number https://www.twilio.com/sms/pricing/us

I'm using the following code and it seems to be working in terms of sending sms to subscriber phone numbers:

for subscriber in subscribers:
    subscriber_num = subscriber.phone_number
    my_sms = "My message to subscribers"
    client.messages.create(
        to= subscriber_num,
        from_=reviewnum,
        body=my_sms
    )

Should I modify my code to take into account one sms per second for "clean local numbers"


Solution

  • Twilio will queue SMS segments if you exceed 1 segment per second, up to 4 hours worth of segments can be queued and will drain at 1 segment per second.

    You can set the maximum lifetime a segment will remain in queue with the validity period (default is 4 hours), keeping in mind you don't want SMS segments to be delivered past normal business hours.