This repo is an example of sending one, a few and many SMS messages using the Twilio API.
You can read about how this code all works in the Ultimate guide to sending bulk SMS with Twilio and Node.js.
Clone the repo, then change into the directory:
git clone https://github.com/philnash/bulk-sms-alerts.git
cd bulk-sms-alerts
Install the dependencies:
npm install
Copy the .env.example
file to .env
:
cp .env.example .env
Fill in the environment variables in .env
. You will need to collect them from your Twilio console.
To run the different scripts, use the npm script. You can run:
npm run firstscoop
to use the messaging API and a Twilio number to send one message.
Run:
npm run multipack
to use the messaging API and a Messaging Service with Copilot to send multiple messages.
Run
npm run 99flake
to use the Notify API to send multiple messages with just one API call.