Building > Reference > app_settings.json > .sms
SMS Settings: Instructions and schema for defining SMS settings
As of v3.6.0, SMS messages can be sent and received using the Africa’s Talking service.
First, run openssl rand -hex 32
in your terminal to generate a long unique key that you will use as the cht-api-key
.
Log on to the Africa’s Talking Dashboard and configure the two callback URLs as follows.
https://<hostname>/api/v1/sms/africastalking/delivery-reports?key=<cht-api-key>
https://<hostname>/api/v1/sms/africastalking/incoming-messages?key=<cht-api-key>
Next, in Africa’s Talking dashboard, generate an “API Key” that you will use as the at-api-key
.
Next, save the at-api-key
in your CHT Core configuration as covered below.
The Africa’s Talking integration uses the CHT Credentials service to retrieve the API keys using the IDs africastalking.com:incoming
and africastalking.com:outgoing
.
Use the CHT credentials API to securely store the credentials by running the commands below.
curl -X PUT -H "Content-Type: text/plain" https://<user>:<pass>@<hostname>/api/v1/credentials/africastalking.com:incoming -d 'cht-api-key'
curl -X PUT -H "Content-Type: text/plain" https://<user>:<pass>@<hostname>/api/v1/credentials/africastalking.com:outgoing -d 'at-api-key'
Update your app settings as follows.
{
"sms": {
"outgoing_service": "africas-talking",
"reply_to": "<africa's talking shortcode>",
"africas_talking": {
"username": "<africa's talking username>"
}
}
}
To test your integration, set your username
to sandbox
, log in to Africa’s Talking, and go to the Sandbox app.
SMS Settings: Instructions and schema for defining SMS settings
Trigger calls and SMS from within the form, or send an SMS once submitted.
Overview of the possible states of SMS messages
How to avoid messaging loops
Using unique short codes to identify places and people via messaging
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.