Skip to content

A simple JS script for sending SMS messages through the Twilio API

Notifications You must be signed in to change notification settings

H12/twilio-sms-script

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

Twilio SMS Script

Description

This is a simple script built to enable sending SMS through the terminal via the twilio api.

Prerequisites

In order to use the script, you need the twilio npm package installed:

npm install -g twilio

And you need to ensure you have the following environment variables set up appropriately:

TWILIO_SID TWILIO_TOKEN TWILIO_NUMBER

These refer to your Twilio account's SID, Auth Token, and a valid Twilio number, respectively.

Usage

Here's an example of how this script would be used from the node repl:

> .load ./sms.js

> sendMsgToFakeNumber = buildMsgSender('+15555555555')

> sendMsgToFakeNumber('Some message')

The above would result in the phone number +15555555555 receiving an SMS reading "Some message".

About

A simple JS script for sending SMS messages through the Twilio API

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published