SAP Connect API Documentation
Base URL: https://{host}/api/http/SAPConnect.ashx
Example deployments:
https://desk.sms.com.na (SaaS),
https://sms.yourcompany.com (Enterprise OnSite)
SAP-Specific API: This endpoint is designed
specifically for SAP Business One / SAP ERP integration using SAP Connect framework. It uses SAP's
standard parameter naming conventions.
The SAP Connect API provides a simple HTTP GET endpoint for sending SMS messages directly from SAP systems using the SAP Connect messaging framework.
Authentication
Authentication is done via query string parameters using your API credentials:
Required Parameters
| Parameter | Type | Description |
|---|---|---|
password |
string | Your API key (acts as password) |
account |
string | Your account identifier (required but value not validated) |
Security Note: While this API uses GET requests for SAP compatibility, ensure your SAP
system is configured to use HTTPS to protect your API key in transit.
Send SMS Messages
Send SMS messages using SAP Connect standard parameters.
Endpoint
GET /api/http/SAPConnect.ashx
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
password |
string | Yes | Your API key |
account |
string | Yes | Account identifier (any value) |
recipient_addr |
string | Yes | Recipient phone number (single number only) |
message |
string | Yes | Message text to send |
ref |
string | No | Your custom reference ID for tracking |
Important Notes
- Single Recipient: Unlike the Basic API, this endpoint accepts only ONE phone number per request
- Parameter Names: Must use SAP standard names (
recipient_addr, nottoormobile) - GET Only: This endpoint only accepts GET requests (SAP Connect standard)
Response Format
The API returns a comma-separated response in plain text format:
Success Response
{sms_id}:{recipient}:{status}
Example
12345:264811234567:PENDING
Response Fields
- sms_id: Unique message ID assigned by SMSDESK
- recipient: The phone number the message was sent to
- status: Message status (typically "PENDING" for queued messages)
Error Response
Errors are returned as plain text messages:
ERROR! [field_name] description
Example
ERROR! [recipient_addr] List of recipients (mobile numbers) NOT GIVEN
Error Messages
| Error Message | Cause | Solution |
|---|---|---|
ERROR! [PASSWORD] and or [ACCOUNT] NOT PROVIDED |
Missing authentication parameters | Include both password and account parameters |
ERROR! [recipient_addr] List of recipients (mobile numbers) NOT GIVEN |
Missing recipient parameter | Include recipient_addr parameter with phone number |
ERROR! [message] Message not provided |
Missing message text | Include message parameter with SMS text |
0:{recipient}:ERROR |
Message failed to queue | Check API key validity and account status |
Examples
Basic Request
GET https://{host}/api/http/SAPConnect.ashx?password=your-api-key&account=SAP001&recipient_addr=264811234567&message=Hello%20from%20SAP
With Reference ID
GET https://{host}/api/http/SAPConnect.ashx?password=your-api-key&account=SAP001&recipient_addr=264811234567&message=Order%20confirmation&ref=ORDER-12345
cURL Example
curl -X GET "https://{host}/api/http/SAPConnect.ashx?password=your-api-key&account=SAP001&recipient_addr=264811234567&message=Hello%20from%20SAP"
Response Example
12345:264811234567:PENDING
SAP Configuration
Setting Up SAP Connect
To integrate SMSDESK with SAP Business One or SAP ERP:
1. Create External Send Process
- Transaction:
SCOT(SAPconnect - Administration) - Create new node for SMS
- Select "External Send Process"
- Configure HTTP destination
2. Configure HTTP Destination (SM59)
| Setting | Value |
|---|---|
| RFC Destination | SMSDESK_HTTP |
| Connection Type | G (HTTP Connection to External Server) |
| Target Host | {host} (your SMSDESK deployment domain) |
| Port | 443 |
| Path Prefix | /api/http/SAPConnect.ashx |
| SSL | Active (HTTPS) |
3. Configure Send Parameters
In your SAP program or workflow, pass these parameters:
DATA: lv_url TYPE string.
lv_url = 'https://{host}/api/http/SAPConnect.ashx'.
lv_url = lv_url && '?password=your-api-key'.
lv_url = lv_url && '&account=SAP001'.
lv_url = lv_url && '&recipient_addr=' && lv_mobile.
lv_url = lv_url && '&message=' && lv_message.
lv_url = lv_url && '&ref=' && lv_reference.
CALL METHOD cl_http_client=>create_by_url
EXPORTING
url = lv_url
IMPORTING
client = lo_http_client.
4. Test Connection
- Use transaction
SM59 - Select your HTTP destination
- Click "Connection Test"
- Verify successful connection
ABAP Code Example
*&---------------------------------------------------------------------*
*& Send SMS via SMSDESK
*&---------------------------------------------------------------------*
REPORT zsmsdesk_send_sms.
DATA: lv_url TYPE string,
lv_mobile TYPE string VALUE '264811234567',
lv_message TYPE string VALUE 'Test from SAP',
lv_api_key TYPE string VALUE 'your-api-key',
lv_response TYPE string.
* Build URL with parameters
CONCATENATE 'https://{host}/api/http/SAPConnect.ashx'
'?password=' lv_api_key
'&account=SAP001'
'&recipient_addr=' lv_mobile
'&message=' lv_message
INTO lv_url.
* Call HTTP client
DATA: lo_http_client TYPE REF TO if_http_client.
cl_http_client=>create_by_url(
EXPORTING
url = lv_url
IMPORTING
client = lo_http_client ).
lo_http_client->send( ).
lo_http_client->receive( ).
lv_response = lo_http_client->response->get_cdata( ).
WRITE: / 'Response:', lv_response.
Integration Complete! Your SAP system can now send
SMS messages through SMSDESK using the standard SAP Connect framework.
Best Practices
- Error Handling: Always check the response for "ERROR!" prefix
- Logging: Log all SMS sends in SAP application log (SLG1)
- Retry Logic: Implement retry for network failures
- Rate Limiting: Don't send more than 10 SMS per second
- Testing: Test thoroughly in development before production
⚠️ Migration Note: If you need more advanced features like bulk sending, scheduled
messages, or delivery reports, consider using the modern SMS API v2 instead.
References & Official Documentation
- SAP NetWeaver Documentation — official SAP NetWeaver help portal
- SAPconnect Administration (SCOT) — official guide to configuring SAP Connect
- HTTP Communication (SM59) — official guide to RFC destinations
- SMSDESK Custom Integrations — overview of all platform-specific integrations
