
Another one alternative method to send SMS from Inviosmart, is HTTP API gateway.
Registered users, apart from sending sms from web application, can also use HTTP API gateway.
That gives the ability to third party applications, with a simple way, to communicate with Inviosmart and deliver their content via HTTP requests. With every request to HTTP API gateway, application can receive the result of the operation. It gets a unique ID that can be used to have a delivery report also.
You can see the usage help HTTP API gateway with a GET request to:
http://httpapi.inviosmart.it/help
The url you can use for sending SMS via HTTP API, by GET requests, is
http://httpapi.inviosmart.it/sendsms/
That command also requires some mandatory arguments to be appended (NOTICE - all variables must be url encoded - http://www.w3schools.com/tags/ref_urlencode.asp).
Below is a sample request, that you can use in your browser's address bar:
http://httpapi.inviosmart.it/sendsms/?username=myusername&password=mypass&destination=393391234567&sender=MyName&message=Hello%20there.
In case of success, the above url will return something like the following:
OK ID:<SMS HTTP request ID>
where <SMS HTTP request ID> is the integer value of the unique ID of the submited SMS. For example:
OK ID:1234
In case of failure, we get one of the below error messages:
You can also track your message status by using another command of the HTTP API.
http://httpapi.inviosmart.it/smsstatus/
The required arguments for that command are:
An example for that command is:
http://httpapi.inviosmart.it/smsstatus/?SMSId=1111&username=myusername&password=mypass
In case of error, command return one of the following messages:
or values separated with [:] symbol. These values contain the info of the requested SMS. Fields are:
<SMSId>:<Submtited On>:<Destination number>:<Delivered On>:<Status number>:<Quantity of SMS>:<Charge amount>
and here is and example:
2345:20101212152514:306912345678:20101212152519:2048:1:0.057
| Field name - Data type | Description |
|---|---|
| SMSId [Integer] | The SMS ID of the query |
| Submited On [String] | Date and time when SMS submited. Field format is YYYYMMDDHHmmSS, where [YYYY:year, MM:month 00~12, DD:day of month 00~31, HH:hour 00~24, mm:minutes 00~59, SS:seconds 00~59]. |
| Destination number [String] | The phone number SMS was sent to. |
| Delivered On [String] | Date and time of the last status change of message. Field format is YYYYMMDDHHmmSS, where [YYYY:year, MM:month 00~12, DD:day of month 00~31, HH:hour 00~24, mm:minutes 00~59, SS:seconds 00~59]. |
| Status number [Integer] |
Status number of SMS. Possible values are:
|
| Quantity of SMS [Integer] | Quantity of SMS that message was charged |
| Charge amount [float] | Amount of charge |
To get the account balance (in Euro) and the remaining sms quantity for a specific country you must call the below url:
http://httpapi.inviosmart.it/account-balance/
If you only want to get the account balance in Euro, you have to supply two arguments (username and password of your account).
In case of error you get on of the following results:
Error: 1001 - No username given. Error: 1002 - No password given.
In case of success you will get something like this:
Status: 1000 - Balance:BalanceInEuro|SmsRemainCount:RemainingSMSCount
where: BalanceInEuro is the value of your account balance and RemainingSMSCount is the quantity of sms. For that case you will always get -9999 number.
If you want to get the remaining sms quantity in your account, then you have to supply countryprefix variable also.
For example, for Italy you give 39. Below is an example of use:
http://httpapi.inviosmart.it/account-balance/?username=myusername&password=mypass&countryprefix=39
In case of success a possible result is something like that:
Status: 1000 - Balance:112.24|SmsRemainCount:2877
Currently there are 13users and 41guests online