API Errors
Contents
Platform Errors
Please refer below for common API Responses that the user receives during integration.
Authentication Related Errors
Below errors occur due to incorrect API requests(URL, Headers, Parameters, Credentials).
Error Code | Reason for Error | Solution |
---|---|---|
400 Bad Request | Incorrect credentials | Re-check the credentials passed in the URL |
|
Error Code | Reason for Error | Solution |
---|---|---|
401 Unauthorized | Incorrect Auth Code | Re-check the format to create the Auth Code (http://docs.ideabiz.lk/Getting_Started/Token_Manegment) |
|
Error Code | Reason for Error | Solution |
---|---|---|
503 Service Unavailable | Exceeded the TPS value assigned to the API | Handle throttling in your application (http://blingtechs.blogspot.com/2017/07/how-you-can-manage-throttle-out-errors.html) |
|
Error Code | Reason for Error | Solution |
---|---|---|
401 Unauthorized | Your subscription to the API is inactive | Please contact Ideabiz Support team to get it approved at support@ideabiz.lk |
|
Error Code | Reason for Error | Solution |
---|---|---|
401 Unauthorized | Incorrect credentials | Re-check the credentials passed in the URL |
|
Error Code | Reason for Error | Solution |
---|---|---|
401 Unauthorized | Using an old access token | Please visit the Ideabiz portal and generate a new token, or generate via the API (http://docs.ideabiz.lk/Getting_Started/Token_Manegment) |
|
API Errors
Below errors occur due to incorrect API requests(URL, Headers, Parameters in the body, etc).
SMS API
400 Bad Request
When MSISDN format is incorrect
{
"requestError": {
"serviceException": {
"messageId": "SVC0284",
"text": "Address format is invalid. Expected format is %1",
"variables": "%1 - tel:+94771211212 or etel:+94-<HASH>"
}
}
}
400 Bad Request
When senderAddress parameter is incorrect or doesn't match the PORT in the header
{
"requestError": {
"serviceException": {
"messageId": "SVC7109",
"text": "URL param port and sender address in request body is not match. %1 - URL param port, %2 - sender address in request body ",
"variables": "%1 - 87798, %2 - tel:87898"
}
}
}
400 Bad Request
When senderName parameter (SMS Mask) is incorrect.
{
"requestError": {
"serviceException": {
"messageId": "POL7101",
"text": "Mask not allowed to current application. Mask is %1",
"variables": "%1 - Test"
}
}
}
Payment API
500 Internal Server Error When the MSISDN in the body and the header mismatches
{
"requestError": {
"serviceException": {
"messageId": "POL0001",
"text": "msisdn on the header does not match with the body",
"variables": "expected url-msisdn format: tel:+94771234567"
}
}
}
400 Bad Request When tried to charge over the allocated limit
{
"requestError": {
"serviceException": {
"messageId": "POL1001",
"text": "charging limit for this user has been exceeded %1",
"variables": "Charging operation failed, maximum credit limit exceeded"
}
}
}
400 Bad Request When the user doesn’t have enough credit
{
"requestError": {
"serviceException": {
"messageId": "POL1000",
"text": "user has insufficient credit for the full transaction amount %1",
"variables": "1.0"
}
}
}
*503 Service Unavailable When the service id is not passed as a string or incorrect.
{
"requestError": {
"serviceException": {
"messageId": "SVC0001",
"text": "Invalid input value for message part %1",
"variables": "invalid serviceId"
}
}
}