API Errors

Contents

Platform Errors

Please refer below for common API Responses that the user receives during integration.

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": "invalid_grant",
    "error_description": "Authentication failed for user@carbon.super"
}


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": "invalid_client",
    "error_description": "Client Authentication failed."
}

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)
{
    "fault": {
        "code": 900800,
        "message": "Message Throttled Out",
        "description": "You have exceeded your quota"
    }
}
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
<ams:fault xmlns:ams="http://wso2.org/apimanager/security">
    <ams:code>900909</ams:code>
    <ams:message>The subscription to the API is inactive</ams:message>
    <ams:description>Access failure for API: /payment, version: v3</ams:description>
</ams:fault>
Error Code Reason for Error Solution
401 Unauthorized Incorrect credentials Re-check the credentials passed in the URL
<ams:fault xmlns:ams="http://wso2.org/apimanager/security">
    <ams:code>900902</ams:code>
    <ams:message>Missing Credentials</ams:message>
    <ams:description>Required OAuth credentials not provided</ams:description>
</ams:fault>

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)
<ams:fault xmlns:ams="http://wso2.org/apimanager/security">
    <ams:code>900904</ams:code>
    <ams:message>Access Token Inactive</ams:message>
    <ams:description>Access failure for API: /pin/subscription, version: v1</ams:description>
</ams:fault>

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"
        }
    }
}
Last updated on 29th Oct 2019