[Blog](https://sparetext.dev/blog)

# Your first text from code in five minutes, timed against Twilio's steps

We made a new account, paired an Android phone and sent a text with one curl, with a clock running. Here's every step, how long it took, and what Twilio's quickstart asks for instead.

Sparetext

5 min read · Nov 20, 2026

You want to see one text leave your code and land on a phone. That's it. Most SMS quickstarts turn that into an afternoon: an account, a trial number, a verified recipient, three credentials and an SDK.

So we put a clock on ours. On 20 November we made a brand new Sparetext account, paired an Android phone and sent a text with one curl. From the click on Create account to the text showing Delivered took 3 minutes and 57 seconds. Here's each step, what it waits on, and what Twilio's own quickstart asks you to do instead.

## How we timed it

We ran it against a test copy of Sparetext on a Mac, with the Android emulator standing in for the phone. The taps were made by a script, so nobody was slow at typing, but it stopped to take screenshots along the way, which ate some of those four minutes. Someone reading each screen for the first time may take a bit longer.

One part we didn't time: getting the app onto the phone. On the emulator it went on in 5 seconds with a developer tool, and on your phone you'll download it in the browser instead (more on that below), so add your own time for that part.

## Step 1: make an account

Name (optional), email and password, then Create account. No card, no phone number to verify. The page answered in 2.6 seconds and dropped us into a short setup with four steps across the top: Choose a phone, Connect it, Send a text, Add an agent.

Android phone is picked already, so the first step is one click on Continue. The next page shows a QR code and a 6-character pairing code, and it waits. It moves on by itself when the phone connects.

## Step 2: put the app on the phone

On the phone, open [the download page](https://sparetext.dev/download#android) and install the app. Sparetext isn't on the Play Store yet, so Android asks you to allow installs from your browser, and Play Protect may warn you because the app asks to send texts. The download page walks through each warning. This is the slowest part for most people, and it's the one we couldn't time on an emulator.

## Step 3: allow SMS and pair

Open the app and tap Get started. It lists what it needs and why. Only one is required: send and receive texts. Tap Allow, then Allow again on Android's own prompt. We allowed notifications too, so the phone can tell you if it stops working as a gateway, and left the rest for later.

Then Continue, and the app asks for the code. Tap Scan QR code and point it at the dashboard, or type the 6 characters. Tap Pair this phone, and that's it: "This phone is now a gateway." Back on the computer, the setup page had already moved to the next step without a refresh.

On the app's home screen there's one more card worth tapping: Run in the background. It lets Sparetext keep sending while the screen is off. Your first text works without it, but a phone on a shelf needs it.

## Step 4: make a key and send

The last setup step has a link, Make an API key. Give the key a name if you like (we used First text), choose Create key and copy it. It starts with `spt_live_`. Keep it in an environment variable, then send:

```bash
export SPARETEXT_API_KEY=spt_live_...

curl -s https://sparetext.dev/api/v1/messages \
  -H "x-api-key: $SPARETEXT_API_KEY" \
  -H "content-type: application/json" \
  -d '{"to":"+15550100012","text":"Hello from my first API call"}'
```

Put your own number in `to`, with its country code. The answer comes back right away, trimmed here:

```json
{
  "batchId": "b_rrwvugufjj3a",
  "messages": [
    {
      "id": "msg_20261120_zwtt9pju",
      "contact": "+15550100012",
      "text": "Hello from my first API call",
      "status": "queued",
      "source": "api"
    }
  ]
}
```

To see where it got to, ask about that id:

```bash
curl -s https://sparetext.dev/api/v1/messages/msg_20261120_zwtt9pju \
  -H "x-api-key: $SPARETEXT_API_KEY"
```

In our run the text went `queued`, then `sent` 0.6 seconds later, then `delivered` at 2.7 seconds. Don't read too much into those numbers: the emulator's pretend radio answers instantly. On a real phone the carrier decides how fast a delivery report comes back, and some carriers never send one, so a text can rest at `sent`.

![The Texts screen of the Sparetext Android app: one text to +1 555-010-0012 reading Hello from my first API call, marked Delivered, sent just now.](https://sparetext.dev/blog/img/first-text-delivered-android.webp)

The same text in the app's Texts tab, a few seconds after the curl. The emulator, with a 555 number.

## What Twilio's quickstart asks for

We didn't make a Twilio account for this, so we can't give you a time for theirs, and we won't guess one. What we can do is count the steps. Their [SMS developer quickstart](https://www.twilio.com/docs/messaging/quickstart) (read on 20 November 2026, last changed 28 September) goes like this for Python:

1. Install Python, ngrok, and Flask with Twilio's Python SDK (`pip install flask twilio`). ngrok and Flask are for the part where you receive texts.
2. Sign up for Twilio and choose Continue with trial.
3. In the Console, open Messaging, find SMS and choose Try out SMS.
4. Follow the prompts to verify a recipient and send a first SMS from the trial number Twilio gives you.
5. Copy your Account SID into a file.
6. Create an API key and copy its SID and Secret. Twilio shows the secret only once.
7. Write `send_sms.py` with those three values, your trial number as From and your verified number as To, and run it.

That's a fair flow, and Twilio's guided trial does send your first text from the Console before you write any code. The catch is what a trial can do afterwards. [Twilio's trial limits page](https://help.twilio.com/articles/360036052753-Twilio-Free-Trial-Limitations), read the same day, says a trial account:

- can send texts only to verified numbers,
- starts every text with "Sent from a Twilio Trial account",
- gets one Twilio number,
- and is capped at 50 messages a day.

So a trial is great for seeing the API work on your own phone, and that's about it. To text a customer you upgrade, and to text US numbers from an ordinary 10-digit number carriers want it registered first. [The 10DLC post](https://sparetext.dev/blog/send-sms-without-10dlc) goes through that part.

## Side by side

- **Credentials:** Sparetext, one key. Twilio, an Account SID plus an API key SID and secret.
- **Who you can text on the free plan:** Sparetext, any number, 300 texts a month on Free. Twilio's trial, verified numbers only, up to 50 a day.
- **What the text says:** Sparetext, exactly your words, from your own number. Twilio's trial, a "Sent from a Twilio Trial account" line first.
- **What you install:** Sparetext, an app on your phone and nothing on your computer (curl is already there). Twilio, an SDK, plus ngrok and Flask for replies.
- **What has to stay on:** Sparetext, your phone, charged and online. Twilio, nothing of yours.

## Where Twilio is the better pick

That last line matters. Twilio needs no phone at all: the number lives in the cloud and keeps working when your phone dies or your SIM changes. It also does what a phone can't: short codes, sender IDs, and real volume. A phone sends about 30 texts a minute under Android's own limit, and carriers start filtering a personal SIM that blasts strangers.

If your texts go to people who know you, like reminders, alerts to your team, codes and replies to customers, a phone you already own gets you there faster and costs nothing per text. If you're building a marketing list or need a brand name as the sender, start with a carrier API. [Sparetext vs Twilio](https://sparetext.dev/blog/sparetext-vs-twilio) has the longer comparison.

## Your next step

Make a free account, pair the phone you have with you, and run that curl with your own number in `to`. When it buzzes, pick your language: [Python](https://sparetext.dev/blog/send-sms-from-python), [Node.js](https://sparetext.dev/blog/send-sms-from-node-js), [PHP](https://sparetext.dev/blog/send-sms-from-php), [Go](https://sparetext.dev/blog/send-sms-from-go), [Ruby](https://sparetext.dev/blog/send-sms-from-ruby), [Java](https://sparetext.dev/blog/send-sms-from-java) or [shell scripts with curl](https://sparetext.dev/blog/send-sms-from-bash-with-curl). On an iPhone, [the iPhone guide](https://sparetext.dev/iphone-sms-gateway) has the three ways to pair it.

Coming from Twilio's quickstart? Our public examples repo, [sparetext-examples](https://github.com/eliasayele/sparetext-examples), puts Twilio's send call next to ours and has runnable examples in curl, Python, Node.js, n8n and Home Assistant, MIT licensed.

send sms sms api quickstart twilio curl android

Try it with the phone you have

Free for 1 phone and 300 texts a month. Pair it in about two minutes.

[Start free](https://sparetext.dev/signup)

## Responses

[Sign in](https://sparetext.dev/login?next=%2Fblog%2Ffirst-text-from-code-in-five-minutes%23responses) or [create an account](https://sparetext.dev/signup?next=%2Fblog%2Ffirst-text-from-code-in-five-minutes%23responses) to respond.

## More from the blog

- **[Uptime Kuma SMS alerts from your own phone, with one webhook](https://sparetext.dev/blog/uptime-kuma-sms-alerts)**
   6 min read
- **[We handed our dashboard to two AI agents: this week in Sparetext](https://sparetext.dev/blog/we-handed-our-dashboard-to-two-ai-agents)**
   5 min read
- **[Is there a free SMS API with no credit card? Six of them, checked](https://sparetext.dev/blog/free-sms-api-no-credit-card)**
   5 min read

---

This is the Markdown copy of https://sparetext.dev/blog/first-text-from-code-in-five-minutes for AI agents. Every public page has one: add .md to its address (the home page is https://sparetext.dev/index.md). Sparetext for agents in one file: https://sparetext.dev/llms.txt
