Hide

YetaWF Documentation

Display
Print

Softelvdm.TwilioProcessor Package

Overview

This package implements base services using a Twilio account. It also implements an SMS provider which can be used to send text messages using your Twilio account and phone number(s). Other packages, such as the Softelvdm.IVR package, can use the basic services provided by the TwilioProcessor package.

Twilio Account

To use any services offered by Twilio and the TwilioProcessor package, an account must be created at Twilio.

Once an account has been created, you will have access to the Twilio Dashboard, which shows the Account SID and Auth Token. These are used by YetaWF and the TwilioProcessor package to communicate with Twilio.

Twilio Console

The Account SID and Auth Token are needed to configure the TwilioProcessor package. This is done in AppSettings.json (./Website/Data/AppSettings.json) by adding the following (using your Acocunt SID and Auth Token):

{
    "Application": {
        "P": {

            . . . clipped . . .

            "Softelvdm_TwilioProcessor": {
                "Live": true,
                "LiveAccountSid": "account sid",
                "LiveAuthToken": "auth token",
                "TestAccountSid": "account sid (test account)",
                "TestAuthToken": "auth token (test account)"
            }
        }
    }
}

This information can be reviewed (but not changed) using Admin > Settings > TwilioProcessor Settings (standard YetaWF site).

Twilio Console

SMS Provider

Once the Account SID and Auth Token have been defined, the TwilioPackage can be used to send SMS text messages using a purchased Twilio phone number (part of your Twilio account). This must be an SMS capable phone number which can be purchased from Twilio.

The phone number used to send SMS text message is defined using Admin > Settings > TwilioProcessor Settings (standard YetaWF site), SMS tab. Enter the test and live phone number. Make sure to check the Enabled check box to enable the SMS Provider.

Twilio Console

The following code sample shows how to send a text message to (407) 555-1212.

SendSMS sendSMS = new SendSMS();
await sendSMS.SendMessageAsync("+14075551212", "Hi! This is a message");
Delivery Receipts

Normally, sending text messages doesn't return a success/failure result. By enabling Delivery Receipts in Admin > Settings > TwilioProcessor Settings (standard YetaWF site), SMS tab, results are recorded in the YetaWF log.

Modules

Module NameDescription
TwilioProcessor Settings ModuleEdits a site's TwilioProcessor settings. This can be accessed at Admin > Settings > TwilioProcessor Settings.

License

The Softelvdm.TwilioProcessor package is part of YetaWF, an open source product licensed under the GNU General Public License, version 3 (GPL-3.0) - Copyright - Softel vdm, Inc.