| Application Programming Interfaces |
| Sending SMS Text Messages |
API Documents |
HTTP(S)
Send us your messages via HTTP(S) POST and we will deliver them to the handset(s). Ideal for use with web centric languages such as PHP, Perl, ASP and Java. |
HTTP API 2.0
PHP Example
|
Delivery Reports sent back to you over HTTP API
We can send you the delivery reports on when a message is delivered to the phone, or if the phone is turned off, or not connected etc, back to your server over a HTTP API. |
Delivery Report API |
EMAIL TO SMS
Send SMS messages by sending an email to xxxxx@sms.smsglobal.com.au where xxxx is the phone number you want to send to. |
Email to SMS API |
SOAP
Send us your messages via SOAP over HTTP(S) and we will deliver them to the handset(s). Compatible with many SOAP client development toolkits such as gSOAP and .NET. |
SOAP API |
Short Message Peer To Peer (SMPP)
Send us your messages using industry standard SMPP V3.4 protocol and we will deliver them to the handset(s). |
SMPP API |
HTTP API 2.0 Commands List Bulk SMS
Sendsms - Send now or scheduled
http://www.smsglobal.com.au/http-api.php?action=sendsms&user=USERNAME&password=PASSWORD&from=
FROMNUMBER&to=TONUMBER&text=testing%20http%20service
SSL is available via the same URL but https://
https://www.smsglobal.com.au/http-api.php?action=sendsms&user=USERNAME&password=PASSWORD&from=
FROMNUMBER&to=TONUMBER&text=testing%20http%20service
This section describes how to send requests from the Client Application (Client) to the Messaging Exchange (MeX) and the possible responses to such requests.
The Client issues a HTTP GET or POST request to the MeX using a specific URL. The MeX issues back a response, which completes the transaction. Please note that the MeX response can either be an HTTP error code or a HTTP OK (200) in which case the returned response body will contain further information.
The Client supplies a number of parameters to the MeX in the request as described below.
| PARAMETER |
DESCRIPTION |
PRESENCE |
| ACTION |
Action taken. Eg: sendsms |
Mandatory |
| USERNAME |
Username for MP account |
Mandatory |
| PASSWORD |
Password for MP account |
Mandatory |
| FROMNUMBER |
Source address (sender) |
Mandatory |
| TONUMBER |
Destination address (recipient) MSISDN should be on international format starting with country code. Example: 61409317436 (Do not use + before the country code!) |
Mandatory |
| CLIENT_CHARSET |
Please encode all messages in UTF-8. (This includes chinese characters etc.) |
Optional |
| MAXSPLIT |
To send messages longer than 160 chars. This is the maximum number of message parts to split it into.
&maxsplit=1 = 160 chars
&maxsplit=2 = 306 chars (153*2)
&maxsplit=3 = 459 chars (153*3).. etc
&maxsplit=1 is the default if not specified. |
Optional |
| SCHEDULEDATETIME |
To schedule the message to be sent some time/date in the future.
Time/Date format is: "yyyy-mm-dd hh:mm:ss" which is URL encoded.
e.g. &scheduledatetime=2008-12-25%2015%3A00%3A00
is 3pm Christmas day 2008.
The timezone is Sydney/Melbourne time (GMT+10) |
Optional |
| TEXT |
Message dataFormat depends on message type. For GSM text messages data is URL encoded. |
Mandatory |
| EXAMPLE - SENDING TEXT MESSAGE |
Username: USERNAME
Password: SECRET
To Address: +61 409317436
Message: Hello world
http://www.smsglobal.com.au.http-api.php?action=ACTION&user=USERNAME&
password=SECRET&from=FROMNUMBER&to=61409317436&text=Hello%20world
|
| RESPONSES |
Responses from the Messaging Exchange (MeX) are encoded in a HTTP response, which contain an status code according to the SMPP specification which is either 0 (OK) or an error code.
Response body includes one or, optionally, two lines: |
1. |
Contains the status code, 0 for success or otherwise a numeric value other than 0 indicating what error occurred. |
2. |
If present, contains a text describing the error that occurred. |
| SUCCESS / FAILURE RESPONSES |
| Example: Response indicating success |
| |
0 |
| |
OK |
| Example: Response indicating failure |
| |
ADD DETAILS |
| |
Recipient (TONUMBER) is missing |
Returns Status code If Status = 0 then returns OK:0 sent queued message ID; SMSGlobalID: MessageID (to use in Statussms)
If Status <> 0 then returns WARNING: Status code
DLR Status - Check the Delivery Receipt status of a sent SMS
By default the server will return a similar string for a successful message:
OK: 0; Sent queued message ID: 74c3c87411099787 SMSGLOBALId:6144436889
The msgid you need to store and reference is the 6144436889
To check the status:
http://www.smsglobal.com.au/mobileworks/dlrstatus.php?user=USER&pass=PASS&msgid=6144436889
Note: We also have another option to post back to you the Delivery Reports via an API as they come in instead of you having to query us to check when a message has been updated. This is preferred as it involves lot less overhead on all systems. See http://www.smsglobal.com.au/api/dlrapi.html
Balancesms - Check MeX balance for the user account USERNAME
http://www.smsglobal.com.au/http-api.php?action=balancesms&user=USERNAME&password=PASSWORD
Please note:
- USERNAME can only query the status submitted by USERNAME.
- Same for Check Account Balance (Balancesms)
- For support, send email to support@smsglobal.com.au
Most common Error codes |
Error Code Value |
Description |
SND_TIMEOUT = "400" |
// Send message timed-out |
SND_TEMP_DISABLED = "401" |
// System temporary disabled |
SND_NO_RESPONSE = "402" |
// No response from SMSGlobal SMSC |
SND_BIND_ERROR = "13" |
// ESME_RBINDFAIL œ Can not Bind to MeX |
SND_SMPP_ERROR = "8" |
// ESME_RSYSERR - System Error |
Also returns some of the relevant SMPP errors
| SND_SMPP_ERROR = "1" |
// ESME_RINVMSGLEN Message Length is invalid |
SND_SMPP_ERROR = "2" |
// ESME_RINVCMDLEN Command Length is invalid |
SND_SMPP_ERROR = "3" |
// ESME_RINVCMDID Invalid Command ID |
SND_SMPP_ERROR = "4" |
// ESME_RINVBNDSTS Incorrect BIND |
SND_SMPP_ERROR = "5" |
/ /ESME_RALYBND ESME Already in Bound State |
SND_SMPP_ERROR = "10" |
// ESME_RINVSRCADR Invalid Source Address |
SND_SMPP_ERROR = "11" |
// ESME_RINVDSTADR Invalid Dest Addr |
SND_SMPP_ERROR = "12" |
// ESME_RINVMSGID Message ID is invalid |
SND_SMPP_ERROR = "13" |
// ESME_RBINDFAIL Bind Failed |
SND_SMPP_ERROR = "14" |
// ESME_RINVPASWD Invalid Password |
SND_SMPP_ERROR = "69" |
// ESME_RSUBMITFAIL Submit SM failed |
SND_SMPP_ERROR = "88" |
// ESME_RTHROTTLED Exceeded allowed message limits |
SND_SMPP_ERROR = "102" |
// Destination not covered or Unknown prefix |
|