Documentation
RelayWizard v1 is in development. This page describes how it is designed to work, and commands or screens may change before launch.
What you need from Twilio
RelayWizard uses your own Twilio account. It does not provide numbers or send texts on an account of ours. Before you start, you need:
- A Twilio account and a phone number on it that can send and receive SMS.
- The account's Account SID, which starts with AC, from the Twilio Console.
- A Standard API key for RelayWizard, made in the Twilio Console for that account: its SID, which starts with SK, and its secret. Twilio shows the secret once, when you create the key. A Restricted key can't set up webhook signing, so setup fails with one. RelayWizard never asks for your Auth Token. See Twilio's API keys.
- The registration your number requires. Texting from a standard U.S. 10-digit number takes A2P 10DLC registration in your Twilio account.
- Opt-out handling. Your account handles STOP and HELP replies through Twilio Advanced Opt-Out.
We recommend a Twilio subaccount used only for RelayWizard. Put the number in it, and make the API key there. A Standard key can reach most of the Twilio account it belongs to, and a subaccount's credentials can't reach your main account or your other subaccounts.
Twilio bills your account for the number, each text, and registration. Those costs are separate from RelayWizard's subscription.
Adding RelayWizard to a server
You need Discord's Manage Server permission on the server. Use Add to Discord, pick the server, and approve. RelayWizard asks for View Channels, Read Message History, Create Public Threads, Send Messages in Threads, and Add Reactions: enough to open a thread for each sender in your bridge channel, post the texts there, read the replies, and mark each reply delivered or failed. It doesn't ask for Send Messages, because it posts only inside threads.
Linking your Twilio number
An admin with Manage Server runs /setup channel: and picks the bridge channel, a text channel where texts will appear. RelayWizard then opens a Discord form that only that admin sees, asking for the Account SID, the API key's SID and secret, and the number. What the admin types there passes through Discord on its way to RelayWizard, which encrypts the key and secret for your server. Your number's incoming texts reach RelayWizard at a webhook address unique to your server, and RelayWizard checks Twilio's signature on every one.
What setup changes on your Twilio account
Setup writes to your Twilio account. It:
- Creates a webhook signing key, a signing setting that uses it, and a rule that applies that setting to RelayWizard's address for your server, so Twilio signs the texts it forwards with a key RelayWizard holds. Twilio can take a minute or two to apply the rule.
- Points the number's incoming-text URL at RelayWizard. This replaces the URL that was there, so whatever handled the number's texts before stops getting them. When it is done, setup tells you the host of the URL it replaced, if there was one. Unlinking doesn't put the old URL back.
If setup fails partway, RelayWizard tries to undo what it made and tells you what went wrong.
Incoming texts
Each person who texts your number gets their own thread in the bridge channel, and their texts appear there with their number. Later texts from the same number land in the same thread.
- Attachments (MMS) aren't relayed. The thread shows how many a text had, and you can see them in the Twilio Console.
- Short codes and alphanumeric senders are ignored, because they can't be texted back.
Replying
Reply in a sender's thread, and RelayWizard sends your message to them as a text from your number, then marks your reply delivered or failed. Replies are text only: files attached to a reply aren't sent. Replies work only in RelayWizard's threads in the bridge channel; nothing posted anywhere else is sent as a text.
Starting a conversation with /sms send
/sms send opens a thread for a number and sends the first text. Only members with Manage Server, or members of the roles an admin chooses with /relaywizard roles, can use it, whatever the number. Everyone else can reply only in threads that already exist. RelayWizard texts a number only after it has texted your number, or after someone allowed to use /sms send has started a conversation with it.
Admin commands
These need the Manage Server permission.
/setup channel:links your Twilio account and number and picks the bridge channel (see Linking your Twilio number)./relaywizard statusshows the linked number and Account SID, the bridge channel, who set it up, and who can use/sms send./relaywizard roleschooses the roles whose members may use/sms send, once the server is linked. Members with Manage Server always can./relaywizard unlinkends the link. On your Twilio account, RelayWizard clears the number's incoming-text URL if it still points at RelayWizard, so the number has none until you set one, and removes the signing key, setting, and rule it made at setup. That cleanup is best effort: if Twilio refuses it, RelayWizard says so, and you can check the number's incoming-text URL and delete the signing key, setting, and rule named RelayWizard in the Twilio Console yourself. Either way, RelayWizard deletes everything it holds for the server. Then delete the API key you made for it.
There is no relink in v1. To change the account, the API key, the number, or the bridge channel, including to rotate the key, run /relaywizard unlink, then /setup channel: again. The old threads stay in Discord, but the number-to-thread history starts over, so each number gets a new thread the next time it texts, and you choose the /sms send roles again.
Who can see and send
Anyone who can see the bridge channel's threads can read the texts, and anyone who can post in a thread can text that person back. Set the bridge channel's permissions to the people who should handle your texts. To keep RelayWizard out of everything else, you can also limit the bot's own access to the bridge channel.
Opt-outs
When someone texts STOP, your Twilio account's Advanced Opt-Out handles it, and that person stops getting texts from your number until they opt back in. HELP replies are handled there too.
Trial and subscription
RelayWizard is $3 per year after a 30-day free trial, plus your own Twilio costs. The subscription belongs to one person, through their TGWAB account, and covers all their servers. Manage or cancel it in your TGWAB account at account.tgwab.us.
Removing RelayWizard
Run /relaywizard unlink, or remove the bot from your server. Removing the bot does what unlinking does, within a day: RelayWizard clears the number's incoming-text URL if it still points at RelayWizard, removes the signing key, setting, and rule it made on your Twilio account (best effort), and deletes the server's settings, its Twilio credentials, and its phone-number records. You can also ask us to delete them at any time through the support page.
Then delete the API key you made for RelayWizard in the Twilio Console, and set your number's incoming-text URL to wherever its texts should go now. Unlink first: RelayWizard needs the key to clear the URL and remove what it made.
What deleting the API key does on its own. It ends RelayWizard's ability to send texts and to change your Twilio account. It doesn't stop incoming texts: they keep reaching RelayWizard until the number's incoming-text URL changes, or until RelayWizard is unlinked or removed while the key still works, which clears it.
Privacy
RelayWizard passes texts between your Twilio number and your bridge channel, stores no message text, and keeps your Twilio credentials encrypted. The privacy policy lists exactly what it receives, sends, and keeps.
Troubleshooting
Texts don't show up in Discord. Check that your number's incoming texts point at RelayWizard and that the bot can see and post in the bridge channel. If the number belongs to a Messaging Service, the service's own incoming-message setting may handle its texts instead of the number's URL. A reply wasn't sent. Check that you replied in a thread in the bridge channel, that the person hasn't texted STOP, and that your Twilio account is funded and its registration is approved. Still stuck? Reach out via the support page.