SMSDESK Configuration Guide

Complete guide to configuring your SMSDESK deployment for SMS messaging, webhooks, and API integration.

Portal Location: This guide references the SMSDESK web portal configuration screens located at /portal/_account/

Accessing the Portal

Login

  1. Navigate to your SMSDESK portal (e.g., https://desk.sms.com.na)
  2. Enter your username and password
  3. Click Sign In

Navigation

After login, you'll see the main dashboard. Key sections:

SMS Channel Configuration

Portal Path: /portal/_account/sms_channels.aspx → Click on a channel → /portal/_account/sms_channel.aspx

Step 1: Access SMS Channels

  1. Click Account in the main menu
  2. Select SMS Channels
  3. Click on an existing channel or create a new one

Step 2: Basic Channel Settings

Field Description Example
Channel Status Enable/disable the channel Enabled
Incoming Shortcode Number for receiving SMS 33333
Outgoing Shortcode Number for sending SMS 44444

Incoming SMS Configuration

Message Forwarding Options

Option Portal Field Description
Forward to Email txt_sms2email Email address to receive incoming SMS notifications
Forward to Mobile txt_forward_mobile Mobile number to forward incoming SMS to
Auto Response chk_auto_response_enabled Enable automatic replies to incoming messages

Incoming SMS Webhook (HTTP POST JSON)

Recommended: Use HTTP POST (JSON) method for modern integrations with HMAC-SHA256 security.
Portal Field Configuration Example Value
WebService Handler lk_webservice_type
WebService URL txt_webservice_url https://your-api.com/webhooks/incoming-sms
Security Key (API) txt_security_key a1b2c3d4e5f6...64chars
Important: The Security Key is used as the HMAC-SHA256 shared secret for all webhooks on this channel (incoming SMS, DLR, opt-out).

Webhook Configuration

Delivery Report (DLR) Webhook

Receive real-time notifications when messages are delivered, failed, or expire.

Portal Field Configuration Example Value
DLR Webhook URL txt_dlr_webhook_url https://your-api.com/webhooks/dlr
DLR Webhook Secret Uses txt_security_key Same as Security Key above
Note: DLR webhooks are sent automatically when delivery reports are received from the SMSC. No additional configuration needed beyond the URL.

Opt-out Webhook

Receive notifications when users send "STOP" to unsubscribe from your messages.

Portal Field Configuration Example Value
Opt-out Webhook URL txt_optout_webhook_url https://your-api.com/webhooks/optout
Opt-out Webhook Secret Uses txt_security_key Same as Security Key above

Complete Webhook Setup Example

Example Configuration

Channel: 33333 (Incoming) / 44880 (Outgoing)
Status: ✓ Enabled

📨 Incoming SMS Webhook:
   Handler: HTTP POST (JSON)
   URL: https://api.yourcompany.com/sms/incoming
   Secret: 64-character secure key (generated)

📊 Delivery Report Webhook:
   URL: https://api.yourcompany.com/sms/dlr
   Secret: (same as above)

🚫 Opt-out Webhook:
   URL: https://api.yourcompany.com/sms/optout
   Secret: (same as above)

🔒 Security Key: a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6q7r8s9t0u1v2w3x4y5z6a7b8c9d0e1f2

Security Key Management

Generating a Secure Key

  1. In the SMS Channel configuration page, locate the Security Key (API) field
  2. Click the Generate button
  3. A cryptographically secure 64-character key will be generated
  4. Copy this key to your application configuration
  5. Click Save Settings
Security Warning:
  • Never commit security keys to version control
  • Store keys in environment variables or secure vaults
  • Rotate keys periodically (every 90 days recommended)
  • Use different keys for production and testing environments

Key Usage

The Security Key is used for:

API Key Configuration

Portal Path: /portal/_account/users.aspx → Click on a user → /portal/_account/user.aspx

Generating API Keys

  1. Navigate to Account → Users
  2. Click on the user who needs API access
  3. Scroll to the API Access section
  4. Click Generate API Key
  5. Copy the generated key immediately (it won't be shown again)
  6. Click Save

Using API Keys

API keys are used for authenticating SMS API requests:

curl -X POST https://{host}/sms/2/messages \
  -H "Authorization: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "messages": [{
      "destinations": [{"to": "+264811234567"}],
      "text": "Hello from SMSDESK!"
    }]
  }'

SMPP Server Configuration

SMPP Protocol: If your system requires SMPP v3.4 connectivity instead of REST API, configure your SMPP client as follows.

SMPP Connection Details

Parameter Value
Server Address {host} (e.g., sms.com.na)
Port 2775
Protocol SMPP v3.4
System ID Your email address (e.g., info@example.com)
Password First 8 characters of your API key
Bind Types TRANSMITTER, RECEIVER, TRANSCEIVER
Important: The SMPP password is the first 8 characters of your API key (not your account password). This is a protocol limitation of SMPP v3.4.

Channel Routing

Messages sent via SMPP are automatically routed using your account's default channel configured in the portal. The source_addr field in the PDU is ignored.

Test SMPP Connection (Python)

import smpplib.client

client = smpplib.client.Client('sms.com.na', 2775)
client.connect()
client.bind_transmitter(
    system_id='your-email@example.com',
    password='rqym36t4'  # First 8 chars of API key
)
client.send_message(
    source_addr='Any',  # Ignored - default channel used
    destination_addr='264811234567',  # No + prefix
    short_message=b'Test from SMPP!'
)
print('✓ Message sent!')
client.unbind()
client.disconnect()

For full SMPP documentation, see the SMPP Server API Documentation.

Testing Your Configuration

Test 1: Send SMS via API

# Replace YOUR_API_KEY with your actual API key
curl -X POST https://{host}/sms/2/messages \
  -H "Authorization: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "messages": [{
      "from": "44880",
      "destinations": [{"to": "+264811234567"}],
      "text": "Test message",
      "deliveryReport": true
    }]
  }'

# Expected response:
{
  "bulkId": "BULK-...",
  "messages": [{
    "to": "+264811234567",
    "messageId": "...",
    "status": {
      "groupName": "PENDING",
      "name": "PENDING_ACCEPTED"
    }
  }]
}

Test 2: Verify Incoming SMS Webhook

  1. Send an SMS to your incoming shortcode (e.g., 33333)
  2. Check your webhook endpoint logs
  3. Verify the X-Signature header is present
  4. Verify signature using the code examples in Incoming SMS Webhook Documentation

Test 3: Verify DLR Webhook

  1. Send a test SMS with "deliveryReport": true
  2. Wait for delivery (usually 5-30 seconds)
  3. Check your DLR webhook endpoint logs
  4. Verify the payload contains messageId, status, statusCode

Test 4: Verify Opt-out Webhook

  1. Send "STOP" to your outgoing shortcode (e.g., 44880)
  2. Check your opt-out webhook endpoint logs
  3. Verify the contact is blacklisted in the portal
  4. Try sending to that number - should be rejected

Troubleshooting

Webhooks Not Receiving Requests

Common Issues:
  • Firewall: Ensure your webhook URL is publicly accessible
  • HTTPS: Use HTTPS for production (HTTP may work for testing)
  • URL Typo: Double-check the webhook URL in portal
  • Channel Disabled: Ensure channel status is "Enabled"

Signature Verification Failing

Common Issues:
  • Wrong Secret: Ensure you're using the exact Security Key from portal
  • Body Modification: Don't parse/re-serialize JSON before verification
  • Encoding Issues: Use UTF-8 encoding for both payload and secret
  • Header Name: Check for X-Signature (case-sensitive)

API Authentication Failing

Common Issues:
  • Wrong Header: Use Authorization: YOUR_API_KEY
  • Expired Key: API keys don't expire, but check if user is disabled
  • Wrong Domain: Ensure you're using the correct SMSDESK domain

Best Practices

Security

Performance

Reliability

Next Steps: