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
- Navigate to your SMSDESK portal (e.g.,
https://desk.sms.com.na) - Enter your username and password
- Click Sign In
Navigation
After login, you'll see the main dashboard. Key sections:
- Account → SMS Channels - Configure SMS channels and webhooks
- Account → Users - Manage user accounts and API keys
- Account → Cron Jobs - Schedule automated tasks
- Monitor - View real-time message statistics
SMS Channel Configuration
Portal Path:
/portal/_account/sms_channels.aspx → Click on a channel →
/portal/_account/sms_channel.aspx
Step 1: Access SMS Channels
- Click Account in the main menu
- Select SMS Channels
- 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
- In the SMS Channel configuration page, locate the Security Key (API) field
- Click the Generate button
- A cryptographically secure 64-character key will be generated
- Copy this key to your application configuration
- 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:
- Incoming SMS Webhooks: HMAC-SHA256 signature in
X-Signatureheader - DLR Webhooks: HMAC-SHA256 signature in
X-Signatureheader - Opt-out Webhooks: HMAC-SHA256 signature in
X-Signatureheader - Legacy GET/SOAP: Passed as
securitykeyparameter
API Key Configuration
Portal Path:
/portal/_account/users.aspx → Click on a user → /portal/_account/user.aspx
Generating API Keys
- Navigate to Account → Users
- Click on the user who needs API access
- Scroll to the API Access section
- Click Generate API Key
- Copy the generated key immediately (it won't be shown again)
- 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
- Send an SMS to your incoming shortcode (e.g., 33333)
- Check your webhook endpoint logs
- Verify the
X-Signatureheader is present - Verify signature using the code examples in Incoming SMS Webhook Documentation
Test 3: Verify DLR Webhook
- Send a test SMS with
"deliveryReport": true - Wait for delivery (usually 5-30 seconds)
- Check your DLR webhook endpoint logs
- Verify the payload contains
messageId,status,statusCode
Test 4: Verify Opt-out Webhook
- Send "STOP" to your outgoing shortcode (e.g., 44880)
- Check your opt-out webhook endpoint logs
- Verify the contact is blacklisted in the portal
- 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
- ✅ Always verify HMAC signatures on webhooks
- ✅ Use HTTPS for all webhook URLs
- ✅ Rotate security keys every 90 days
- ✅ Store keys in environment variables, not code
- ✅ Use different keys for dev/staging/production
Performance
- ✅ Return 200 OK quickly from webhooks (process async)
- ✅ Implement idempotency (same webhook may be sent twice)
- ✅ Log all webhook attempts for debugging
- ✅ Use bulk SMS API for sending multiple messages
Reliability
- ✅ Implement retry logic for failed API calls
- ✅ Monitor webhook endpoint uptime
- ✅ Set up alerts for webhook failures
- ✅ Keep webhook endpoints simple and fast
Next Steps:
- 📚 Read the SMS API Documentation
- 🔌 Read the SMPP Server API Documentation
- 🔔 Read the Webhooks Documentation
- 💻 Download code examples from the documentation
- 🧪 Test in a development environment first
- 🚀 Deploy to production with monitoring
