Content Deep Dive
How to Send an SMS from a Shell Script using cURL
Blog post from Twilio
Post Details
Company
Date Published
Author
Miguel Grinberg
Word Count
786
Language
English
Hacker News Points
-
Summary
To send an SMS from a shell script using cURL, one needs a Twilio account with a purchased phone number, cURL installed, and environment variables set for Twilio credentials and phone numbers. The most secure way to define these values is by setting environment variables such as `TWILIO_ACCOUNT_SID`, `TWILIO_AUTH_TOKEN`, `TWILIO_NUMBER`, and `TO_NUMBER`. With the environment variables set, one can send an SMS with a single-line command using the cURL command-line utility. The syntax may vary slightly depending on whether the user is following the tutorial on a Unix or MacOS computer or a Windows computer.