Skip to content
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
59 lines (39 sloc) 2.34 KB

Africa's Talking Integration

Added in v3.6.0

SMS messages can be sent and received using the Africa's Talking service.

Africa's Talking configuration

First generate a long unique key to use as the medic-api-key.

Log on to the Africa's Talking Dashboard and configure your callback URLs as follows.

  • Delivery Reports: https://<hostname>/api/v1/sms/africastalking/delivery-reports?key=<medic-api-key>
  • Incoming Messages: https://<hostname>/api/v1/sms/africastalking/incoming-messages?key=<medic-api-key>

Then generate an "API Key" (we'll refer to this as the at-api-key) and save this in your Medic configuration covered below.

Medic configuration

API keys

The API keys should be treated as securely as a password as anyone with access to them will be able to send messages using your account. Therefore we store them in the CouchDB configuration.

To add the credentials to the admin config you need to either PUT the value using curl or similar:

curl -X PUT https://<user>:<pass>@<domain>/_node/couchdb@ -d '"<medic-api-key>"'
curl -X PUT https://<user>:<pass>@<domain>/_node/couchdb@ -d '"<at-api-key>"'

(Note that couchdb@ is the local node name, and may be different for you depending on your setup.)

You can also add it via Fauxton:

  • Navigate to the Config screen
  • Click Add Option
  • The Section should be medic-credentials, the Name should be or, and the value should be the relevant API key.
  • Click Create
  • You should then be able to see your credential in the list of configuration shown

App settings

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.

You can’t perform that action at this time.