SMS API for webdevelopers (HTTP Server)
Ozeki Message Server 6 has a built in HTTP server. This means, that simply using HTTP client requests you can send / receive SMS messages and you can control the SMS server. This guide explains the basic HTTP interface elements.
I. How to check the number of credits
HTTP Request: |
HTTP Response: |
Note:
- The number of credits determine how many SMS messages can be sent by the user. If this number is -1 it means unlimited.
- The action parameter specifies the command you are executing. In this case the command is getCredits
- The ozmsUserInfo parameter specifies the user. You can put the user information in plain text, or you can use the md5 checksum of the password, which would give you a little more protection.
II. How to send an SMS message
HTTP Request: |
HTTP Response: ACCEPTREPORT: |
Note:
- When you send a message you must specify the recepient and the messageData fields. The values must be urlencoded.
- The action parameter specifies the command you are executing. In this case the command is sendMessage
- The ozmsUserInfo parameter specifies the user information.
- If the message is accepted for delivery you receive an AcceptReport containing a StatusCode of zero (0) and a message id string
- If the message is not accepted for delivery the StatusCode is greater than zero and the StatusText contains the error message
- If this user name and password is invalid, the server returns an HTML page containing a login prompt.
More information
- HTTP Client SMS
- SMS API for webdevelopers (HTTP Server)
- Md5