Member-only story

Easily Send Yourself Text Messages (SMS) for Free from the Command Line

Chris Bailey
5 min readDec 2, 2022

--

Use a simple curl command (or CLI tool) to send yourself a text message. Useful as part of a script, to notify you when a long task completes.

I often find it’d be useful to get a notification when some longer task I’m doing completes. In particular I find this useful if I’m running a big manual data import or process on a cloud server and want to know when it completes. When I first started looking into this, I figured I’d just build a little web service (using AWS Lambda and API Gateway) that I could make an HTTP call to, and it’d then send me a text. I still like this idea for doing notifications to other (non-SMS) services, e.g. to Slack. However, the reality is SMS serves my needs well, and you can do all of this with no code and for free, depending on how much you use it.

Twilio’s HTTP API or CLI Tool

Enter Twilio. I’ve used Twilio a lot in the past for SMS, so it was my default service choice. I imagine various other SMS API services can do this too, so check with your preferred, but I’ll cover Twilio here.

With Twilio, once you setup an account, you can send an SMS two ways with no code:

  1. Web/HTTP request (e.g. using curl or similar)
  2. Twilio’s CLI tool

--

--

Chris Bailey
Chris Bailey

Written by Chris Bailey

NatureQuant CTO/Co-founder. HotelTonight Co-founder. Cyclist, trail runner, skier, espresso & coffee lover, geek, traveler, foodie.

Responses (1)