Doc On Github SignUp

Introduction

Learn how to integrate our APIs into your application and build your own solution

API Basics

The Emobilesms API gives you access to pretty much all the features you can use on our dashboard and lets you extend them for use in your application.

Sample Requests

We provide sample API calls next to each method using cURL. All you need to do is insert your specific parameters, and you can test the calls from the command line. See this tutorial on using cURL with APIs.

Requests and Response

Both request body data and response data are formatted as JSON. Content type for responses will always be application/json.

API Balance

Authenticate your API calls by including your secret key in the Authorization header of every request you make. You can manage your API keys from the dashboard.


$curl = curl_init();
$body = [];
curl_setopt_array($curl, array(
CURLOPT_URL => "https://emobilesms.com/api/balance.php",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => $body,
CURLOPT_HTTPHEADER => array(
"Content-Type: application/json",
"Authorization:
giluye1ukeneqeyece7a6ufiwaxe5ici3a5ute5urajucivuyubidu6arage3u8"
),
));
$response = curl_exec($curl);
print_r($response);

BUY AIRTIME

$curl = curl_init();
$body = json_encode(["network" => "mtn", "amount" => "50", "phoneno" => "08067421633"]);
curl_setopt_array($curl, array(
CURLOPT_URL => "https://emobilesms.com/api/airtime.php",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => $body,
CURLOPT_HTTPHEADER => array(
"Content-Type: application/json",
"Authorization: giluye1ukeneqeyece7a6ufiwaxe5ici3a5ute5urajucivuyubidu6arage3u8"
),
));
$response = curl_exec($curl);
print_r($response);

BUY DATA

$curl = curl_init();
$body = json_encode(["datasize" => "mtn500", "phoneno" => "08067421633"]);
curl_setopt_array($curl, array(
CURLOPT_URL => "https://emobilesms.com/api/databundle.php",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => $body,
CURLOPT_HTTPHEADER => array(
"Content-Type: application/json",
"Authorization: giluye1ukeneqeyece7a6ufiwaxe5ici3a5ute5urajucivuyubidu6arage3u8"
),
));
$response = curl_exec($curl);
print_r($response);

BUY CABLE

$curl = curl_init();
$body = json_encode(["package" => "smallie", "iuc" => "2029159670"]);
curl_setopt_array($curl, array(
CURLOPT_URL => "https://emobilesms.com/api/cabletv.php",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => $body,
CURLOPT_HTTPHEADER => array(
"Content-Type: application/json",
"Authorization:
=giluye1ukeneqeyece7a6ufiwaxe5ici3a5ute5urajucivuyubidu6arage3u8"
),
));
$response = curl_exec($curl);
print_r($response);

BUY EDUCATION

$curl = curl_init();
$body = json_encode(["productid" => "waec"]);
curl_setopt_array($curl, array(
CURLOPT_URL => "https://emobilesms.com/api/vendeducation.php",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => $body,
CURLOPT_HTTPHEADER => array(
"Content-Type: application/json",
"Authorization: giluye1ukeneqeyece7a6ufiwaxe5ici3a5ute5urajucivuyubidu6arage3u8"
),
));
$response = curl_exec($curl);
print_r($response);

BUY ELECTRICITY

$curl = curl_init();
$body = json_encode(["disco" => "ibedc", "meterNo" => "37132073729", "amount" => 50]);
curl_setopt_array($curl, array(
CURLOPT_URL => "https://emobilesms.com/api/vendelectricity.php",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => $body,
CURLOPT_HTTPHEADER => array(
"Content-Type: application/json",
"Authorization: giluye1ukeneqeyece7a6ufiwaxe5ici3a5ute5urajucivuyubidu6arage3u8"
),
));
$response = curl_exec($curl);
print_r($response);