User documentation

⌘K
  1. Home
  2. User documentation
  3. Notification Pack
  4. SMS notifications initial configuration

SMS notifications initial configuration

The Notification Pack allows you to send notifications by SMS. To start sending SMS you need to choose a SMS provider and copy / paste your API keys in Booking Activities settings.

  • Go to the Booking Activities settings, “Notifications” tab
  • Scroll down to the “SMS Notification Settings” section

 

Select a SMS provider

Simply choose the desired provider from a select box, and enter your API authentication keys.

The fields for entering the required keys will be displayed dynamically when you select the provider, so you know what credentials you need to enter. You will generally find this information easily from your SMS provider account, see below how to find them by provider:

 

AllMySMS

Sender ID A Sender ID of your choice. You must respect the formatting constraints. In some countries, you need to preregister it in SMS > My senders’ name > Add new row
API Login Your account login. Find it in My Account > My profile > Login.
API Key Find your API Key in API & Modules > Api Key & Parameters > Your API Key.

 

Brevo (SendInBlue)

Sender ID Name of the sender. The number of characters is limited to 11 for alphanumeric characters and 15 for numeric characters.
Recipients in some countries (including the U.S.) cannot see sender personalization. Instead, the sender appears as a numerical short code.
API Key Find your API Key in Your account > SMTP & API > “API keys” tab > Generate a new API key > Give it a name like “bookingactivities-sms” > Generate > Copy your API key (you have only one chance to copy it) (docs).

 

ClickSend

Sender ID A Sender ID of your choice. You must respect the formatting and local constraints
Username Find your username and API key in Developers > API Credentials > “Username” and “API Key”.
API Key

 

CM.com

Sender ID The sender name. The maximum length is 11 alphanumerical characters or 16 digits. There are some country-specific restrictions too (docs).
Product Token Find your Product Token in your cm.com account > API > Messaging Gateway > Authentication > “Product tokens” tab > Product token > Copy.

 

MessageBird

Originator The sender of the message. This can be a telephone number (including country code) or an alphanumeric string. In case of an alphanumeric string, the maximum length is 11 characters. In some countries, you need to register it in SMS > Registered originators.
Access Key In order to find your Access Key, sign in to the “Connectivity Platform” > Developers > “API access” tab > Show key (use the “test” key on your development site, and the “live” key on your live site).

 

Octopush

Sender ID Sender of the message (if the user allows it), 3-11 alphanumeric characters (a-zA-Z0-9).
Login Find your Login and API Key in API & Integrations > HTTP API credentials > Click the “eye” icon to reveal the API Key.
API Key

 

PrimoTexto

Sender ID The personalized sender of the message: “YourCompany”. Without personalization, the sender will be a short numeric code of type XX XXX. If you personalize the sender, it must contain between 3 and 11 ALPHANUMERIC characters.
Clé API Find your API Key in API > Gestion des clés.

 

SendPulse

Sender ID Sender information as an alphanumeric value, 11 symbols maximum.
API ID Find your API ID and API Secret in your account menu > Account settings > “API” tab > Click the “eye” icon to reveal the API ID and Secret.
API Secret

 

Sinch

Sender ID Sender information as an alphanumeric value, 11 symbols maximum.
Service Plan ID Find your Service Plan ID and API Token in SMS > Service APIs > “Services” tab > Click ” Show” icon to reveal the API Token.
API Token

 

SMSEnvoi

Sender ID The Sender name (rules). If the message type allows a custom TPOA and the field is left empty, the user’s preferred TPOA is used. Must be empty if the message type does not allow a custom TPOA.
Username Your account email and password, the ones you use to log into your account. You can find them again in Account > Account settings > “API & IPs” tab.
API Password

 

SMSFactor

Sender ID Allows you to customize the sender.
API Token Find your API Token in Developers > API Tokens > Create an API token > Click “Click to display” button to see the token.

 

smsmode

Sender ID The sender ID (between 1 and 11 characters) (docs).
API Key Find your API Key in Settings > API Keys > Generate a new API Key.

 

Spot-Hit

Sender ID The sender name. Between 3 and 11 characters (see more restrictions in “expediteur” entry in the table).
API Key Find your API Key in your account menu > My Account > API.

 

Telesign

Sender ID With a trial account, use the phone number associated to your account. Moreover, with a trial account, you will only be able to send SMS to test phone numbers, you can add one in your account menu > Manage test numbers.
With an upgraded account, this parameter allows you to set a specific sender ID to be used on an SMS message sent to the end user. In order to use a specific sender ID, Telesign must whitelist your selected sender ID values (docs).
Be aware that 100% preservation of a sender ID value is not guaranteed. Telesign may override the sender ID value that your end user will receive in order to improve delivery quality or follow SMS regulations in particular countries. In order to use this feature, you must contact Telesign Support and have them enable it for you. We recommend limiting values to 0-9 and A-Z, as support for other ASCII characters varies by carrier.
Customer ID Find your Customer ID and API Key in your account menu > API Keys > Click “Show” button to see the key.
API Key

 

TextingHouse

Sender ID Allows you to customize the sender ID of the SMS. Sender ID personalization is restricted to a set of names authorized for your account. Limited to 11 unaccented characters (a-zA-Z0-9), and must be registered in your account > “Noms d’expéditeur” tab. The personalization of the sender ID is not possible for certain destinations (technical restriction of certain operators). TextingHouse reserves the right to replace the sender chosen by the customer at the time of sending.
Username Find your Username and Password in the API login tab.
Password

 

Textlocal

Sender ID Use this field to specify the sender name for your message. This must be at least 3 characters in length but no longer than 11 alphanumeric characters or 13 numeric characters. Sender names can also include full stop, &, underscore or hyphen. Sender name should be limited to your brand rather than a reference to the SMS content or user. If this is excluded, it will use the default sender name configured on your account.
API Key Find your API Key in Settings > API Keys (you may need to create a new key).

 

Twilio

Twilio phone number / Alphanumeric Sender ID The sender’s Twilio phone number (in E.164 format), alphanumeric sender ID, Wireless SIM, or short code. The value of the from parameter must be a sender that is hosted within Twilio and belongs to the Account creating the Message.
Find your Twilio phone number in the Account Info area. You may need to create your phone number first in the easy setup wizard just above.
You will be able to customize the sender with an Alphanumeric Sender ID after upgrading your account. Moreover, you can only send SMS to verified numbers with a trial account (in Phone numbers > Manage > Verified Caller IDs) (docs).
Account SID Find your Account SID and Auth Token number in the Account Info area or in the “Account” menu > Keys and Credentials > API keys & tokens (here, you can find both your test and live API credentials).
Auth Token

 

Vonage (Nexmo)

Sender ID The name or number the message should be sent from. Alphanumeric senderID’s are not supported in all countries, see Global Messaging for more details. If alphanumeric, spaces will be ignored. Numbers are specified in E.164 format.
API Key Find your API Key and API Secret in your
Communications APIs dashboard > API Settings
.
API Secret

 

Other – Manual curl configuration

If you want to use a SMS provider that is not preconfigured (i.e. not in the list), you may configure it by yourself. You need technical knowledges for that.

There are two requirements:

  • the SMS provider must have a REST API (99% have one)
  • the SMS provider needs only one curl request to send a SMS (90% the case). Some SMS providers (like SendPulse) require two requests: one for authentication, the second for sending the SMS. These are not compatible (or require additional custom code).

The first step is to find the API documentation to send a SMS with a curl request. Once you have it, you will need to configure the transpose the curl request to Booking Activities’ fields:

  • Select “Other – Manual curl configuration” in the select box
  • Sender ID: Required. Usually the phone number provided by your SMS provider, or an arbitrary alphanumeric ID (11 characters). This value will be stored in the {sender_id} tag, that you can use in the curl options below.
  • API Login: May be required. Some SMS providers require a user ID in addition to the API Key, you can usually find it in your SMS provider account dashboard and enter it here. This can be named differently. This value will be stored in the {api_login} tag, that you can use in the curl options below.
  • API Key: Required. All SMS providers require a secret key to authenticate, you can usually find it in your SMS provider account dashboard and enter it here. This can be named differently. This value will be stored in the {api_key} tag, that you can use in the curl options below.
  • API URL (CURLOPT_URL): The URL that the request should be sent to.
  • Curl Header (CURLOPT_HTTPHEADER): Data included in the curl request header. Set the part before the “:” in the “Key” column, and the part after the “:” in the “Value” column. (E.g.: “Key” = “content-type” / “Value” = “application/json”)
    • The “content-type” header is often necessary as it defines how the data are formatted before being sent (the SMS provider expects a certain data format):

      • “Content-Type” is not specified: the data is sent as an array
      • “Content-Type” = “application/json”: the data is sent as a json object
      • “Content-Type” = “application/x-www-form-urlencoded”: the data is sent as URL parameters
  • Curl Data (CURLOPT_POSTFIELDS): Data posted in the request body. This is an array with keys and values (e.g.: “Key” = “sms_content” / “Value” = “{message}”). The the value is an array, separate the keys with a dot in the “Key” column (e.g.: “Key” = “my_array.0” / “Value = “Hello”, “Key” = “my_array.my_key.0.name” / “Value” = “Hello”).
  • Curl Options (additional CURLOPT_*): You can add any curl options here (e.g.: “Key” = “CURLOPT_TIMEOUT” / “Value” = “30”).

You can use some tags in the API URL (CURLOPT_URL), Curl Header (CURLOPT_HTTPHEADER), Curl Data (CURLOPT_POSTFIELDS) and Curl Options (additional CURLOPT_*) fields :

  • {sender_id}: Sender ID field value.
  • {api_login}: API Login field value.
  • {api_key}: API Key field value.
  • {base64_token}: This is the base64 encoded value of the API Login and API Key separated with a colon (base64_encode( {api_login}:{api_key} )).
  • {message}: The SMS message.
  • {recipient}: The recipient phone number with the international prefix (string).
  • {recipient_no+}: Same as {recipient} but the phone number doesn’t have the leading +.
  • {recipients_array}: The recipients phone numbers with the international prefix (array).
  • {recipients_array_no+}: Same as {recipients_array} but the phone numbers don’t have the leading +.

To know how to fill these fields, you need to analyse the curl request in the SMS provider documentation and transpose it in Booking Activities settings. Here is an example:

curl -X POST \
'https://api.mysmsprovider.com/sms/YOUR_USER_ID/send' \
-H 'Authorization: Basic YOUR_API_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"from": "SENDER_ID",
"to": "+33612345678",
"text": "Hello this is a test SMS",
"date" : "2019-03-25 19:00:00"
}'

transposes to

  • Sender ID: Your custom alphanumeric sender (or the phone number given by your SMS provider). Check your SMS provider documentation.
  • API Login: Find your “USER ID” in your account dashboard and paste it here.
  • API Key: Find your “API TOKEN” in your account dashboard and paste it here.
  • API URL (CURLOPT_URL): https://api.mysmsprovider.com/sms/{api_login}/send
  • Curl Header (CURLOPT_HTTPHEADER):
      Key Value
      Authorization Basic {api_key}
      Content-Type application/json
  • Curl Data (CURLOPT_POSTFIELDS):
      Key Value
      from {sender_id}
      to {recipient}
      text {message}
  • Curl Options (additional CURLOPT_*): Leave it empty.

Activate the Debug Mode option to be able to read the curl response in the wp-content/plugins/booking-activities/log/debug.log file, the success / error messages will be displayed here and will let you know if it is working / what is not working.

Do you need more examples?

  • Go to Booking Activities > Settings > Notifications tab > Scroll down to “SMS notifications settings” > Select any SMS provider in the “SMS Provider” select box > Save changes
  • Click “Show advanced options” below the “SMS Provider” select box
  • A “API documentation” link appears and all the fields appear with their preconfigured values. So you can see the API documentation and how the fields have been filled accordingly for each of the preconfigured SMS providers.
Note that you can add values to preconfigured SMS providers, and override the preconfigured values simply by adding a row with the same Key and your custom Value. To override the API URL, add a “CURLOPT_URL” row in the Curl Options (additional CURLOPT_*) array.

Congratulations, the initial configuration is done. You need now to set up your SMS notifications, and retrieve the phone number of your customers, as well as their permission.

How can we help?