How to configure a Twilio SMS Gateway in ADSelfService Plus

How to configure a Twilio SMS Gateway in ADSelfService Plus

Objective   

This article provides detail instructions on how to configure a Twilio SMS Gateway in ADSelfService Plus. This allows you to send SMS notifications and multi-factor authentication (MFA) messages via custom HTTP integration.

Prerequisites

Before configuring ADSelfService Plus, you must gather the following three pieces of information from your Twilio account console:
  1. Account SID: Your unique account identifier. Example: AC822c6980a322c745ac883f86617a6704
  2. Auth token: Your secret API authentication token. Example: 754811b836e773ecba554ffcbf11cd72
  3. Twilio phone number: A verified sender phone number that Twilio uses to dispatch SMS messages. This number must be purchased and configured within your Twilio account.
NotesNote: If you are using a Twilio trial account, you can only send SMS messages to phone numbers that you have verified within your Twilio account. Licensed accounts can send messages to any valid mobile number globally, subject to Twilio's pricing and regulations. 
Info
Important note for authentication:
To securely authenticate with Twilio, you need to combine your ACCOUNT SID and AUTH TOKEN into a single string and then encode it using Base64.
Format: ACCOUNT_SID:AUTH_TOKEN
Example input: AC822c6980a322c745ac883f86617a6704:754811b836e773ecba554ffcbf11cd72
You can use any standard Base64 encoding tool or command-line utility to perform this conversion. The resulting encoded string will be used in the Authorization HTTP header during the configuration process.

Steps to configure Twilio SMS in ADSelfService Plus 

  1. Log in to the ADSelfService Plus admin console.
  2. Navigate to Admin > Product Settings > Mail/SMS Settings > SMS Settings.
  3. Fill in the following configuration details:
    1. SMS Provider: Select Custom.
    2. Send SMS Via: Select HTTP.
    3. HTTP Method: Select POST.
    • HTTP Parameters:
      Body=%message%&To=%mobNo%&From=+FromNumber
      • Replace +FromNumber with the actual sender number in Twilio (e.g., +15017122661). Ensure you include the + prefix.
      • %message% and %mobNo% are placeholders that ADSelfService Plus will dynamically replace with the message content and recipient's mobile number, respectively.
    • Define the expected responses from the provider:
      • Success Response: <sid> (Twilio returns a unique SID (message SID) upon successful message submission.)
      • Failure Response: <Code> (Twilio typically includes an error code in its response if a message fails.)
    • HTTP Request Headers:
      • Authorization: Basic <Base64-encoded ACCOUNT SID:AUTH TOKEN>
        • Replace <Base64-encoded ACCOUNT SID:AUTH TOKEN> with the Base64-encoded string you generated earlier.
      • Content-Type: application/x-www-form-urlencoded
  1. Click Save Settings to apply the configuration.
  2. Use the Send Test SMS link within ADSelfService Plus to confirm successful SMS delivery.

How to reach support             

If the issue persists, contact our support team here

                  New to ADSelfService Plus?

                    • Related Articles

                    • How to configure custom SMS provider in ADSelfService Plus?

                      ADSelfService Plus lets you use any one of the following methods to send an SMS: GSM modem Clickatell (built-in support) Custom SMS gateway Configuring custom SMS gateway You can configure a custom SMS gateway to send notifications and verification ...
                    • Multi-factor authentication techniques in ADSelfService Plus

                      Let's take a look into the various authentication methods supported by ADSelfService Plus for enterprise multi-factor authentication (MFA). Why should you use MFA? Authentication based solely on usernames and passwords is no longer considered secure. ...
                    • Encryption and data storage in ADSelfService Plus database

                      Encryption in the ADSelfService Plus database ADSelfService Plus' database uses the following encryption methods to store sensitive data: Database Encryption method PostgreSQL AES-256-CBC Microsoft SQL AES-256-CBC The following sensitive information ...
                    • SMS and email verification codes

                      With mobile devices becoming almost like an additional limb for most of us, it makes sense to utilize them as a tool to prove our identity. SMS and email verification codes are sent to the registered mobile number or email address of users, and they ...
                    • Configuring high availability in ADSelfService Plus

                      ADSelfService Plus utilizes automatic failover to support high availability in case of system and product failures. Essentially, this means that when the ADSelfService Plus service on one machine fails, another instance of ADSelfService Plus running ...