Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 11 Next »

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.

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

image-20240930-161757.png

Enter the parameters from the previous step:

image-20240930-161907.png

Save it.


Return to the setting, and test it.

image-20240930-162323.png
  • 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
  • No labels