Smstunnel medusa
SMSTunnel for Medusa: a Notification Module Provider for the sms channel. Texts go out from your own Android phone, from your own number.
SMSTunnel for Medusa
: a Notification Module Provider for the channel. Medusa's notifications become texts that your own Android phone sends, from your own number, through SMSTunnel.
Your store hands each text to your SMSTunnel account, and your phone sends it from its own SIM, so customers see a number they know and can reply to. No SMS provider account and no sender registration: the phone runs the SMSTunnel app and is linked to your account.
SMSTunnel for Medusa is made by NARBOWEB SRL. It is not affiliated with, endorsed by, or sponsored by Medusa.
Install
Medusa 2 (tested with 2.22.2), Node.js 20 or newer. No other dependencies.
Get your key
- Install the SMSTunnel app from Google Play on the Android phone that will send the texts, and sign in.
- Open your dashboard at dashboard.smstunnel.io/apps. The phone shows up under Phones (or link it there with Phones → Add phone).
- Under Apps, click Add an app and copy the key it shows. A new key can send texts and look up their status.
Put it in your Medusa environment (, or your host's secret settings), never in your code:
Set it up
Register the provider with Medusa's Notification Module in :
Medusa takes one provider per channel: if another provider already handles , swap it for this one. Medusa won't start without an , so a missing variable shows up right away.
| Option | |
|---|---|
| Required. Your SMSTunnel API key. | |
| Required by Medusa: . | |
| Texts by template name, with filled from the notification's (dots reach inside objects: ). | |
| Completes numbers written without or , e.g. . It wins over the phone's own country. | |
| The phone that sends, when your account has several (its ID is under Phones, with a Copy button). Empty: your phone that is online. | |
| Default . | |
| Default . |
Text the customer when an order is placed
Add a subscriber, :
With the template above, the customer gets: Thanks Ana! Your order #1042 is confirmed. The same pattern works for , , and the other Medusa events.
Customers type phone numbers in many ways. Ask for the international format at checkout, or set for your country.
Send a text from your own code
From a workflow step, an API route or a scheduled job, resolve the Notification Module and pass the text in :
What a notification can carry:
| Field | |
|---|---|
| One number, in international format (). For several people, create one notification each. | |
| The text, up to 1600 characters. When it's there, it is sent as is. | |
| + | Without , the provider's filled from . |
| Medusa's own field. The provider also sends it to SMSTunnel (), so a retry within 24 hours gets the first text's answer instead of a second text. | |
| Send from this phone. | |
| For this text only. | |
| sends it as a sign-in code: the text must contain a code of 4 to 10 digits on its own (, or ), 320 characters at most, and it counts against your sign-in code allowance. | |
| Your own key instead of . |
Each notification Medusa stores keeps SMSTunnel's message id in .
When a text doesn't go out
throws, and Medusa stores the notification with status . The error says why:
| SMSTunnel answered | What it means |
|---|---|
| 401 | The API key is wrong, deactivated or deleted. Create a new one under Apps → Add an app. |
| 403 | The key lacks a permission (the error carries and the permission), or your plan doesn't include what was asked. |
| 429 | Too many requests (30 sends a minute per key): says how many seconds to wait. Without it, today's allowance of your plan is used up (pricing). |
| 5xx, or no answer | SMSTunnel had a problem. The text may or may not have gone out: check the Messages page in your dashboard before you send it again, or send it again with the same . |
| 400 | SMSTunnel refused a field, such as a number it can't read or a code text without a code. |
A number that isn't one, a list of numbers in , an empty text or one over 1600 characters is refused before anything is sent.
If your phone is offline, the text isn't lost: it waits in the queue on your account and goes out as soon as the phone is back online (up to 3 days). The provider logs that it was queued.
The provider never resends a text by itself. In a subscriber, a failure is logged by Medusa and doesn't affect the order.
Using the client directly
The package also exports the small API client it uses, for status checks or listing phones:
Build it with an AI assistant
Paste this into Claude, ChatGPT, Cursor or Copilot and replace the part in brackets. Never paste your real API key into a prompt.
Responsible use
Send only texts that people expect from you: order updates, pickup notices, reminders, sign-in codes. Unsolicited messages from a personal SIM break most carriers' terms of service. Make sure your use follows your carrier's terms and local rules (in the EU, GDPR and the ePrivacy rules on electronic communications).
Development
The end-to-end tests run only against a local SMSTunnel API, never smstunnel.io. They read from a JSON file and, with , check each text in the test server's database:
builds the image in , uses the compose project , and removes its containers and volumes at the end ( leaves them running).
Links: SMSTunnel docs · Dashboard: Apps · Medusa Notification Module
Issues
Report a bug or ask for a feature at https://github.com/narcisbodea/smstunnel-medusa/issues. For your SMSTunnel account, see https://smstunnel.io/docs/.
License
MIT, © NARBOWEB SRL. See LICENSE.


