General Bytes offers the Twilio API to send SMS codes to you & your customers. The charges per SMS vary across regions.
NOTE: The major phone carriers around the globe impose limits upon the frequency of SMS transmission. They do this to prevent SMS spam & to provide a consistent service. The carriers use equipment that has limitations; there’s no getting around this. When these limits are exceeded, the carrier will “filter” out the excess SMS traffic, and those messages will simply be discarded: lost. You’ll commonly see these filtering events occur in batches.
Navigate to Twilio at: https://www.twilio.com/
Create your Twilio account.
NOTE: The use case for SMS messaging within CAS is for Identity Verification and Opt-in Notifications.
Crypto-related solicitations are forbidden, as is any other “high-risk” financial spam.
Twilio will reject you (or close your account) if you use their service for such messaging.
US/Canada guidelines: https://support.twilio.com/hc/en-us/articles/360045004974-Forbidden-Message-Categories-for-SMS-and-MMS-in-the-US-and-Canada
Provide a valid email & phone number, and the following options:
Locate your keys:
Both the “ACCOUNT SID” and “AUTH TOKEN” are required.
Buy a phone number.
In this example, the cost is only $1/month.
Make sure it is SMS & Voice capable (MMS, Fax not required).
Assemble the required parameters:
Using a colon “:” between all 3 parameters, place them in this specific order:
SID:TOKEN:PHONE
For this example, it would look something like:
ACc1ef9a43c47020ee0c4a0a5980dc839b:8a1d4ae90d81306e0208eec086f:+18558101002
Copy & paste the entire parameter string in one paste operation.
CAS fields doesn’t append previous entries.
Navigate to CAS: Organization: SMS Provider
Enter the parameters from the previous step:
Save it.
Return to the setting, and test it.
You’ll be asked for a receiving phone number.
The number should be in international format, e.g.
+420296399328
For trial accounts (only), the number must be pre-verified in your Twilio settings.
If everything went as planned, you should see:
Troubleshooting
From the bash console, you can test your Twilio settings.
First, collect and set these from your Twilio settings:
sid=[ENTER YOUR TWILIO SID] token=[ENTER YOUR TWILIO TOKEN] from_phone_number=[ENTER YOUR TWILIO "FROM" PHONE NUMBER] test_number=[ENTER THE INTERNATIONAL-FORMATTED TEST PHONE NUMBER]
If everything is correct and functional, then this (typed in the same, active bash window) will send a text to the target phone number:
curl "https://api.twilio.com/2010-04-01/Accounts/$sid/Messages.json" -X POST --data-urlencode "To=$test_number" --data-urlencode "From=$from_phone_number" --data-urlencode 'Body=Hello from GB' -u $sid:$token