SMSTunnel for Apple Shortcuts, Tasker and MacroDroid

A text from your own number, from any of your devices

Built into each app · nothing else to install
An HTTP action: Get Contents of URL, HTTP Request

Your SMSTunnel phone sends it, wherever you tap

An iPhone, an iPad, a tablet on the wall or a second Android phone can ask your SMSTunnel phone to send a text: "On my way home" when you leave work, or "Battery low" from a device you can't watch. The text goes out from your own Android phone and number, so people see a number they know.

1. Get your key

  1. 1. Install the SMSTunnel app from Google Play on your Android phone and sign in.
  2. 2. In your dashboard, open Apps → Add an app, pick Script or server, name it (for example "Shortcuts") and click Create the key.
  3. 3. Copy the key right away: it's shown only once. You can stop or delete the app there anytime, and Shortcuts can't send texts anymore.

Get the steps with your key in them

It opens Add an app with Script or server picked. Once the key is made, the dashboard shows every step and command with the key already filled in, ready to copy.

Apple Shortcuts (iPhone, iPad, Mac)

  1. 1. Create a shortcut and add a Text action with the words (or Ask for Input, to type them each time).
  2. 2. Add Get Contents of URL, enter the URL and tap Show More:
URL
https://smstunnel.io/api/v1/sms/send
Method
POST
Headers
X-API-Key = your key
Request Body
JSON, with two Text fields:
to (Text)
+14155550123
message (Text)
the Text action (or Provided Input) as a variable
  • Make to a Text field: a Number field would drop the +. Shortcuts writes the JSON itself, so any words are safe.
  • Run it once: add Quick Look after the request while testing, to see SMSTunnel's answer.
  • For "when I leave work", add a personal automation (Leave, Time of Day, Wi-Fi, NFC or Battery Level) that runs it immediately.

Tasker (Android)

Add the action HTTP Request to a task (search for it in the action list):

Method
POST
URL
https://smstunnel.io/api/v1/sms/send
Headers
the two lines below, one per line, no spaces around the colon
Body
{"to":"+14155550123","message":"Tablet battery low: %BATT%"}
Timeout
30
Headers
X-API-Key:sk_live_...
Content-Type:application/json
  • Tasker sends the body exactly as you typed it, with %BATT filled in. A variable that holds quotes would break the JSON: keep variables to numbers and plain words.
  • Run the task with the play button; %http_response_code holds the answer (200 is sent). For a battery alert, use a profile on Battery Level from 0 to 15.

MacroDroid (Android)

Add the action Web Interactions → HTTP Request to a macro (for example with the trigger Battery Level, decreases to 15%):

Request method
POST
URL
https://smstunnel.io/api/v1/sms/send
Header Params
X-API-Key = your key
Content Body
application/json, with the body below
Block next actions until complete
on, with Save HTTP return code in integer variable
Content Body
{"to":"+14155550123","message":"Battery low on {device_name}: {battery}%"}

Worth knowing

  • The key sits in the shortcut or task. Don't share it with the key in it (Shortcuts can ask for it on import instead), and give each device its own app in SMSTunnel, so you can stop one alone.
  • One text, one number. For several people, one request per number.
  • Automations that fire often (every Wi-Fi change, every percent of battery) can send many texts. SMSTunnel takes 30 a minute.
  • Phone offline? The text waits and goes out as soon as the phone is back.

If it doesn't work

  • 401 "Invalid or expired API key": the key is wrong or was deleted. "API key is required. Use X-API-Key header.": the key isn't in an X-API-Key header. SMSTunnel reads the key only from that header: Bearer or Basic authentication won't work.
  • 403 with PERMISSION_REQUIRED: the key may not send texts. Make a new one under Apps → Add an app.
  • 400 "property … should not exist": the body has a field SMSTunnel doesn't know. Send only to and message (and, if you need them, deviceId and defaultCountryCode). "message must be shorter than or equal to 1600 characters": shorten the text. "Phone number must contain…": put the number in international format, like +14155550123.
  • 400 with "to must be a string" and "message must be a string": the body didn't arrive as JSON. Add the header Content-Type: application/json.
  • 404 "Cannot GET /api/v1/sms/send": the tool sent a GET. Choose POST.
  • 429: too many texts at once. SMSTunnel takes 30 send requests a minute. Wait a minute and try again.
  • No text, but no error? If your phone is offline, the text waits and goes out as soon as the phone is back online. Open the SMSTunnel app on the phone to check it's linked.

Build it with an AI assistant

Copy this prompt into Claude, ChatGPT, Cursor or Copilot and replace the part in [brackets]. Don't paste your API key into the chat: the prompt doesn't need it.

Help me make my iPhone, iPad or another Android device send a text through my own phone with SMSTunnel, from Apple Shortcuts, Tasker or MacroDroid.

About SMSTunnel (https://smstunnel.io): my own apps and tools hand text messages (SMS) to my SMSTunnel account, and my own Android phone sends them from my own number, on my own SIM and plan. The phone runs the SMSTunnel app from Google Play (https://play.google.com/store/apps/details?id=io.smstunnel.app), signed in to my account.

What I want: [describe what should send a text, to whom, and when]

How it works:
- No app besides the automation tool: each one has an HTTP action that calls SMSTunnel's API.
- Apple Shortcuts: "Get Contents of URL" with URL https://smstunnel.io/api/v1/sms/send → Show More → Method POST → Headers: X-API-Key = <my key> → Request Body: JSON with two Text fields, "to" (international format) and "message" (a variable such as Provided Input or the output of a Text action). Shortcuts builds the JSON itself. Use the Text type for "to": a Number field would drop the +. Personal automations (Time of Day, Arrive, Leave, Wi-Fi, NFC, Battery Level) can run it without asking.
- Tasker: action HTTP Request, Method POST, URL https://smstunnel.io/api/v1/sms/send, Headers one per line:
X-API-Key:sk_live_...
Content-Type:application/json
Body {"to":"+14155550123","message":"Tablet battery low: %BATT%"}, Timeout 30. Tasker sends the body exactly as typed, so a %variable with quotes would break the JSON (build it in a JavaScriptlet with JSON.stringify if needed). Profile e.g. State → Battery Level 0–15. %http_response_code holds the answer code.
- MacroDroid: action Web Interactions → HTTP Request, Request method POST, URL https://smstunnel.io/api/v1/sms/send, Header Params X-API-Key = <my key>, Content Body application/json: {"to":"+14155550123","message":"Battery low on {device_name}: {battery}%"}. Trigger e.g. Battery Level decreases to 15%. "Block next actions until complete" and "Save HTTP return code in integer variable" help when testing.
- One recipient per request: SMSTunnel sends one text to one number. For several people, one request (or one notification) per number.
- Answers: 200 {"success": true, "messageId": "…"}; 401 wrong or deleted key; 403 the key lacks a permission ("code": "PERMISSION_REQUIRED"); 400 a missing, unknown or too long field; 429 too many requests (30 sends a minute, with Retry-After): wait and retry; without Retry-After, the plan's limit for the day or month is reached. If my phone is offline the text waits and goes out when it is back, within 3 days.
- The API key comes from my SMSTunnel dashboard (https://dashboard.smstunnel.io): Apps → Add an app → Create the key. It is shown only once and can send texts and check whether they went out.

Rules for your answer:
- Do not ask for my SMSTunnel password or API key and do not put a real key in your answer; I will not paste it in this chat.
- Phone numbers must be in international format (+ and the country code).
- Help me test it with my own number first.
- Only send texts people expect from me. No unsolicited texts.
- Only automations that text people who expect it (myself, my family about my own trips, my team).

Responsible use

Built for alerts to yourself and your team, and texts people expect from you. One text goes to one number. Sending unsolicited messages from a consumer SIM generally breaches mobile carrier terms of service.

Apple and Shortcuts are trademarks of Apple Inc.; Tasker belongs to João Dias (joaomgcd) and MacroDroid to ArloSoft. SMSTunnel is a third-party integration and is not affiliated with, endorsed by, or sponsored by Apple Inc., joaomgcd or ArloSoft.

No phone paired yet?

Install the Android app and sign in with your account, and you're ready in about a minute.

Get it on Google Play