/twilio-bulk

Uses the Twilio API to bulk send SMS messages

Primary LanguagePHP

Twilio Bulk

Uses the Twilio API to send SMS messages in bulk

  1. Run composer install
  2. Rename the config-sample directory to config
  3. In auth.txt, enter your account_id and auth_token from Account Settings as well as your sent_from number from Phone Numbers
    • The default sent_from number is a Twilio test number that will appear to send successfully but won't actually send any messages
  4. In cost.txt, set the cost per SMS send, currency symbol and the exchange rate from USD to your local currency
    • This step is not necessary but is used to project the amount you will be charged
    • Example pricing and exchange rates are accurate at the time of writing but may require updating in future
    • See Twilio's Pricing
  5. In message.txt, enter the content of the SMS message you wish to send
    • Your messages will cost you roughly 50% less if you only use characters from the GSM-7 Character Set
  6. in recipients.txt, enter the phone numbers of the intended recipients, one per line (including country code, without spaces or special characters, e.g. +441234567890)
  7. When ready to send, run php twilio-bulk.php from the command line
    • Your message will be shown first and any characters that aren't in the GSM-7 Character Set will be highlighted in red
    • The presence of such characters will force UCS-2 encoding, which will reduce the number of characters that will fit in a single SMS and therefore will cost you more
    • Read more about GSM-7