In this tutorial, Rimantas explains how to connect Signal Magician with Twilio for sending notifications, sign-in codes, and trading signals via SMS messages.
Signal Magician has an ability to sent SMS notifications to customers. It can be trade signals or other messages like Sign-In codes for Two-factor authentication (2FA).
But before Signal Magician can send SMS messages you have to connect it with Twilio.
Twilio is a way of sending SMS messages in more than 200 countries worldwide.
To connect Signal Magician with Twilio through their API you’ll need 4 things:
- A funded Twilio account.
- Account SID;
- Auth Token;
- Phone number provided by Twilio;
I highly recommend enabling Auto Recharge in the Billing section of your Twilio account. That way, you’ll make sure that your account never runs out of credits. You do not want people not getting their SMS messages with Sign-In Codes from you.
Log in to Twilio Account
Copy and Paste Twilio Account SID and Auth Token
Once you log in to the Twilio account, there will be your “Account SID” and “Auth Token” codes on the Dashboard.
In case the Twilio panel design has changed, browse around to find those codes. It might be on the “Settings” page, etc.
You need to copy and paste those codes to your Signal Magician panel.
Copy and Paste Phone Number
Click on “# Phone Numbers” to open the page where you can find a phone number that Twilio provided for you.
If you do not have a phone number yet on Twilio, you can buy one by clicking on “Click + To Buy New Number”.
Log in to your Signal Magician panel as Admin
Linking Signal Magician with your Twilio Account
Inside Signal Magician panel, go to the Admin Settings page and open the SMS Alerts section.
There, you can enable SMS notifications and input your Twilio Account SID, Auth Token, and Twilio Phone Number.
Once you set these SMS Alerts settings, you can try sending a test SMS message.
At the bottom of the same page, there’s a “Send test SMS” section. Here you can verify if your connection with Twilio works well.
Input your mobile phone number and click on “Send”. If all works well, you should receive a test SMS message in a few seconds. Sometimes it takes up to a minute to receive a text message.
If you see any error messages on your Signal Magician panel when sending an SMS message, then double-check if you have input correct Twilio account authentication details.
Enabling Sign-In Code – Two-factor authentication (2FA)
When your Signal Magician is capable of sending SMS messages after you connect it with Twilio, you can also enable Two-factor authentication (2FA). In Signal Magician, we call it the Sign-In Code.
The Sign-In is like an additional layer of security that sends a code to the customer and allows them to log in to the system only if he/she inputs a correct code.
Signal Magician can send Sign-In Codes via email or SMS.
In this case, we choose to send Sign-In Codes as SMS messages.
Admin can also choose who will use the Sign-In Code, and the options are “Everyone” or “Everyone except Administrators”.
Log in to your Signal Magician panel as a customer
Now when the Sign-In Code is enabled, let’s try to login as a customer to see how it works.
You will have to logout from the system and then login as a customer.
Or, you can open a new private browser window and log in as a customer there. This way, you can be logged in to the system as admin and as a customer at the same time.
If the login and the password are correct, the system will check if that particular customer has a mobile phone attached to his/her profile.
If there’s no phone number attached, the system will ask to input it.
If there is a phone number attached, the system will send a temporary Sign-In Code to that mobile.
On the next page, the system will ask to enter a temporary Sign-In Code, which was sent to the customer’s mobile phone.
If the code is correct, the system will sign-in the customer to his/her profile.
If the code is incorrect or expired, the system will not let the customer inside.
The expiration time window for the Sign-In Code is 5 minutes.
Once a customer gets inside the system, he/she can see or change SMS notification settings in the Notifications sections of the Profile page.
A mobile phone number that customer uses during the login will be automatically assigned as a phone number for SMS notifications and marked as confirmed.
A customer can change these settings and a phone number at any time.
Note that even though we see “trading signals by SMS” are enabled on the customer’s profile, admin can control whether those signals are being sent or not.
Log in to your Signal Magician panel as Admin
Controling notification settings
Admin has full control of which trading signals and how to send them.
In the picture above, we see notification settings of the same customer, but from the Admin panel.
“Enable SMS Alerts service” allows Admin to enable or disable this service for each customer individually. When disabled, the customer won’t even see these settings on his/her profile page. Only Admin can control this parameter.
Also, Admin can change a phone number or its status for any customer. When the state is “Not confirmed”, the customer won’t receive trading signals through SMS until he/she confirms it through the Notifications section on the Profile page.
“Receive trading signals by SMS”, tells the system whether this particular customer wants to receive signals or not. Customers can also control this parameter.
Choosing which trading signals to send through SMS text messages
And of course, for the system to send trading signals via SMS, first you have to enable them.
These settings allow Admin to control what type of trading signals the system should send to customers.
In this case, I allow the system to send trading signals about newly opened and or closed trades. It means the system will only send a message when a Signal Provider opens or closes a trade.
It is also possible to send signals about triggered pending orders or when a trade is modified (changed stop loss, take profit, or pending order entry price). However, I don’t recommend these because if a Signal Provider uses a trailing stop, then it will send hundreds of messages with every SL/TP change.
When the system knows which trading signals to send through SMS, then it will check which customers are opted-in to receive them and have a confirmed phone number attached.
Be careful when sending trading signals through SMS, especially if you have hundreds of customers. The system sends a separate SMS message to each customer for every trading signal. It means that if a Signal Provider opens 10 trades per day and you have 250 customers eligible to receive SMS text messages, then the system will send 10 x 250 = 2,500 SMS messages.
If it takes approximately half a second to submit each SMS message to Twilio, then it will take approximately 1,250 seconds (about 21 minutes) in total to submit all messages.
Also, keep in mind that Signal Magician is not responsible for the successful delivery of SMS messages. It will only submit messages to Twilio through API. The rest of the delivery process depends on Twilio and mobile operators.
A useful feature in Signal Magician is that Admins can see a history of all SMS messages submitted to Twilio.
If it is a trading signal, you’ll also see a trade ticket next to it.
The system also shows a counter which tells how many messages were successfully submitted and accepted by Twilio API.
Example SMS message with a Sign-In Code
Above, you can see an example SMS message with the Sign-In Code. Ths verification code in this example is 656155, and that’s what a customer must enter to log into his profile.