Knowledge Base

Client-API Interaction

Sub-categories

  1. SMS API 2.0
    Our industry-leading interface for server-to-server integration.
  2. SMS API 2.1
    The upcoming version of our SMS API.

 

Specifications

Articles

Tutorials


Article

Recognising when, and understanding why, a routine has failed.

Overview

The different reasons why a Client-API interaction may fail to be executed can be categorised as:

  1. Network errors
  2. Processing errors

Network Errors

A network error means that the HTTP request carrying the details of the Client-API interaction was not received. This can be recognised through the first line of our HTTP response (i.e. the 'status line') which would normally contain "HTTP/1.1 200 OK" if the request was received correctly. So, a network error can be recognised when the status code is any value besides "200" and its exact nature can be identified through that code.

Processing Errors

A processing error means that the HTTP request was received successfully, but for some other reason, the routine could not be executed (e.g. insufficient credits). This can be recognised through the first five letters in the body of our HTTP response which will be the word "error" followed by an explanation within brackets, like this:

error(code|text)

The explanation within brackets is made up of an error code and textual explanation, seperated by a pipe character, for example:

error(0004|The value for 'username' is not valid.)