Setting Up
Before getting started, you will need to set up your application for sending messages through our API. This involves downloading the right SDK for your application and setting up your account options to allow message submission through our API.
SDK Download
As earlier indicated, there different messaging SDKs for integrating our API in custom applications. You will need to download SDK that matches with your development environment. Once downloaded, you will need to reference the SDK library in your projects.
The procedure for including or referencing the SDK in your projects will depend on your development environment as well as the programming language being used. You will need to consult the manual for your development environment on how to use external libraries in your projects.
SDK Reference
In order to be able to use the SDK data types and functions, applications need to reference the SDK in the projects. The method for importing or referencing the SDK in applications will depend on the IDE used in developing the application.
PHP Applications
In the case of PHP, the AuthLoader.php
file, which can be found in the root of the SDK library,
must be included in the of the application for sending
messages. Ideally, it can be included in the main application page handler.
require ("PATH_TO_SDK_ROOT_DIR/AutoLoader.php");
To reference the SDK in Laravel applications, developers need to require the
AutoLoader.php
file in the index.php
located in the public
directory.
For instance, it can be referenced immediately after the section for autoload.php.
require __DIR__.'/../vendor/autoload.php';
// require the AutoLoader.php file in the SDK
require __DIR__.'/PATH_TO_SDK_ROOT_DIR/AutoLoader.php';
PATH_TO_SDK_ROOT_DIR
will depend on the location where the SDK was copied to in the application.
Python Applications
To be able to reference the SDK in python applications, the python SDK must be download and extracted.
The extracted directory contains a setup.py
which is needed to install the python SDK package for
use in python applications. The python module pip
will be required for installing the SDK package.
Suppose the SDK package has been extracted into C:\sdk-package-dir-name
directory, then we can give the following
command to install the package into the python application:
python -m pip install C:\sdk-package-dir-name\
Before giving the command, ensure that the directory contains the setup.py
file. When executed,
the command will install the python SDK package for use in your application. You should
invoke python with the name you use to invoke on your system. For example, python3
.
Account Setup
Sending messages through our API requires an active messaging account. If you do not already have an account, kindly create an account for integrating in your custom SMS applications.
To be able to send messages through our API, ensure that your account is setup to allow sending messages through API requests. You need to enable this in API options of your account settings.