HTTP SMS SERVER – CREDIT CHECK #
It is possible to know one’s remaining credit for sending SMS via an HTTP Rest API call structured as follows:
- URL: https://secure.agiletelecom.com/services/sms/credit
- METHOD: GET
- AUTHENTICATION: Basic / Api-Key / OAuth1.1
The response will be in JSON format (with Jsend specification in case of errors):
- 2XX (message accepted by the server)
{
"credit": 10.324
}
FIELD | TYPE | NOTES |
credit | double | Account credit remaining expressed in € |
- 5XX (request not processed due to server-side errors)
{
"status": "error",
"message": "Number check service unavailable",
"code": 9
}
FIELD | TYPE | NOTES |
---|---|---|
status | string | “error” always applies to 5XX errors |
message | string | Describes the type of server-side problem encountered while processing the request |
code | integer | Custom error code. Indicates the type of problem as specified in the error code table given next |
CODICE | DESCRIZIONE |
---|---|
1 | Wrong credentials |
2 | Insufficient credit |
4 | Wrong destination number(s), format is not valid. |
6 | At least a message body is missing |
7 | At least a message body is too long or some characters are not supported |
8 | Server error |
9 | Server error (service timeout) |
10 | At least one sender is missing |
11 | User not found (wrong credentials) |
13 | At least one destination number is missing |
14 | Message items are missing |
15 | Destinations and Ids arrays have different lenghts |
18 | Wrong sender or sender not allowed |
20 | Value of globalId not allowed |
21 | Value of maxIdLen not allowed |
22 | Value of udgData is not correct |
23 | Valued of scheduling is not correct |
24 | Value of the body is not allowed |
100 | Source IP is not allowed |