Trouble Shooting

Sorting Issues in your Code

Authentication Errors:

The Africa's Talking API requires authentication from the requesting application for requests to be implemented. You can look at which APIs expect the auth credentials in the sample code we provide over at Docs.

You get authentication errors if:

  1. You do not supply your username and password when creating an instance of the Gateway Class.
  2. You provide the wrong or expired(changed) API key
  3. You mix up the API key or username - e.g. using the live environment APIKey/Username on the sandbox.

USSD Errors:

Currently, the USSD API does not expect authentication. All the interactions that you receive on the API are based on a session.

A session is timed in seconds by the provider and can be 180 sec or less (20 sec).

During the session, the session ID does not change, and hence you can monitor it to identify if a user is returning to a new menu within the same session(session ID is constant) or if a new session or user has began (new session Id) interactions.

How to resolve USSD errors:

  1. As a first step when developing with USSD, check your dashboard for the session data. All the errors are presented in the session data, including responses from your server - and you can easily see if your code has errors.
  2. Check your web server logs. For Apache HTTP Server Logs, the default installation for Apache2 on Ubuntu creates a log sub directory: /var/log/apache2. For Windows OS, the location of the files for WAMP are in c:\wamp\logs, while in XaMPP they are found in \xampp\apache\logs. Within this sub directory are two log files with two distinct purposes: /var/log/apache2/access.log - records of every page served and every file loaded by the web server. /var/log/apache2/error.log - records of all error conditions reported by the HTTP server. You can use the server logs to see where the errors are in your code.
  3. Ensure that you are receiving a HTTP POST in your callback.

results matching ""

    No results matching ""