Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/philnash/bulk-sms-alerts
An example of sending one, a few and many SMS messages using the Twilio APi
https://github.com/philnash/bulk-sms-alerts
Last synced: 11 days ago
JSON representation
An example of sending one, a few and many SMS messages using the Twilio APi
- Host: GitHub
- URL: https://github.com/philnash/bulk-sms-alerts
- Owner: philnash
- License: mit
- Created: 2017-12-18T03:53:51.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2020-07-27T08:13:51.000Z (over 4 years ago)
- Last Synced: 2024-05-22T20:32:45.034Z (6 months ago)
- Language: JavaScript
- Size: 42 KB
- Stars: 31
- Watchers: 5
- Forks: 12
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Bulk SMS alerts
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](https://www.twilio.com/blog/2017/12/send-bulk-sms-twilio-node-js.html).
## Running the code
Clone the repo, then change into the directory:
```bash
git clone https://github.com/philnash/bulk-sms-alerts.git
cd bulk-sms-alerts
```Install the dependencies:
```bash
npm install
```Copy the `.env.example` file to `.env`:
```bash
cp .env.example .env
```Fill in the environment variables in `.env`. You will need to collect them from your [Twilio console](https://www.twilio.com/console).
To run the different scripts, use the npm script. You can run:
```bash
npm run firstscoop
```to use the [messaging API](https://www.twilio.com/docs/api/messaging) and a [Twilio number](https://www.twilio.com/phone-numbers) to send one message.
Run:
```bash
npm run multipack
```to use the [messaging API](https://www.twilio.com/docs/api/messaging) and a [Messaging Service with Copilot](https://www.twilio.com/copilot) to send multiple messages.
Run
```bash
npm run 99flake
```to use the [Notify API](https://www.twilio.com/docs/api/notify) to send multiple messages with just one API call.