WAP Push
http://www.smsglobal.com/http-api.php?action=sendsms&msgtype=wappush&user=USERNAME&password=PASSWORD&from=FROMNUMBER&to=TONUMBER&url=URL&subject=SUBJECT
SSL is available via the same URL but https://
https://www.smsglobal.com/http-api.php?action=sendsms&msgtype=wappush&user=USERNAME&password=PASSWORD&from=FROMNUMBER&to=TONUMBER&url=URL&subject=SUBJECT
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.
Username: USERNAME
Password: SECRET
To Address: +61 409317436
Subject: SMSGlobal's website
URL: http://www.smsglobal.com
http://www.smsglobal.com/http-api.php?action=ACTION&user=USERNAME& password=SECRET&from=FROMNUMBER&to=61409317436&subject=SMSGlobal's+website &url=http%3a%2f%2fwww.smsglobal.com
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:
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
Incoming SMS - Receive replies on your webserverIncoming SMS will be delivered to the URL specified in the preferences page once you have logged into your account. Check under the "Incoming SMS Settings" section.
The arguments are:
TO (which number the message was sent to)
FROM (the sender's MSISDN)
MSG (the contents of the message)
USERFIELD (the same INTERNAL ID submitted when sending the SMS that the incoming SMS is a reply to)
DATE (the date and time the message was received by SMSGlobal's servers)
e.g. if a phone is turned off, you will receive a DLR status with 107 Absent subscriber with the DONEDATE at the initial attempt to send the message, then when the phone is turned back on, you will receive another DLR report with the same message id with an updated status of DELIVRD, and the DONEDATE of the time the message was delivered when the phone was turned on.
So e.g. a url would be http://www.yourserver.com/receivedlr.php?to=TONUMBER&from=FROMNUMBER&msg=TEXT&userfield=YOURINTERNALID&date=DATETIME
Please respond with "OK" to complete delivery of the message. If SMSGlobal receives no response, we assume your server is down and continue to attempt to send the message to you.
Balancesms - Check MeX balance for the user account USERNAMEhttp://www.smsglobal.com/http-api.php?action=balancesms&user=USERNAME&password=PASSWORD
http://www.smsglobal.com/http-api.php?action=sendsms&msgtype=wappush&user=USERNAME&password=PASSWORD&from=FROMNUMBER&to=TONUMBER&url=URL&subject=SUBJECT
SSL is available via the same URL but https://
https://www.smsglobal.com/http-api.php?action=sendsms&msgtype=wappush&user=USERNAME&password=PASSWORD&from=FROMNUMBER&to=TONUMBER&url=URL&subject=SUBJECT
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 |
MSGTYPE | Set to "wappush". Sends WAP link to the recipient's phone | 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 |
URL | The URL to be pushed (must be URL-encoded) | Mandatory |
SUBJECT | The subject of the message (must be URL-encoded) | Mandatory |
EXAMPLE - SENDING VCARD |
---|
Password: SECRET
To Address: +61 409317436
Subject: SMSGlobal's website
URL: http://www.smsglobal.com
http://www.smsglobal.com/http-api.php?action=ACTION&user=USERNAME& password=SECRET&from=FROMNUMBER&to=61409317436&subject=SMSGlobal's+website &url=http%3a%2f%2fwww.smsglobal.com
RESPONSES |
---|
Response body includes one or, optionally, two lines:
- Contains the status code, 0 for success or otherwise a numeric value other than 0 indicating what error occurred.
- If present, contains a text describing the error that occurred.
SUCCESS / FAILURE RESPONSES |
---|
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
Incoming SMS - Receive replies on your webserverIncoming SMS will be delivered to the URL specified in the preferences page once you have logged into your account. Check under the "Incoming SMS Settings" section.
The arguments are:
TO (which number the message was sent to)
FROM (the sender's MSISDN)
MSG (the contents of the message)
USERFIELD (the same INTERNAL ID submitted when sending the SMS that the incoming SMS is a reply to)
DATE (the date and time the message was received by SMSGlobal's servers)
e.g. if a phone is turned off, you will receive a DLR status with 107 Absent subscriber with the DONEDATE at the initial attempt to send the message, then when the phone is turned back on, you will receive another DLR report with the same message id with an updated status of DELIVRD, and the DONEDATE of the time the message was delivered when the phone was turned on.
So e.g. a url would be http://www.yourserver.com/receivedlr.php?to=TONUMBER&from=FROMNUMBER&msg=TEXT&userfield=YOURINTERNALID&date=DATETIME
Please respond with "OK" to complete delivery of the message. If SMSGlobal receives no response, we assume your server is down and continue to attempt to send the message to you.
Balancesms - Check MeX balance for the user account USERNAMEhttp://www.smsglobal.com/http-api.php?action=balancesms&user=USERNAME&password=PASSWORD
Possible error codes through API | |
---|---|
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 |
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 |
Yeah!! All the important features of an SMPP Server API can easily be managed or controlled from almost any location. This is mainly because of its highly integrated and user-friendly control panel. Its responsive design offers users the potential of monitoring and controlling their servers even through their mobile phones.
ReplyDelete