Laravel Nubapi Client

View the Laravel client on GitHub at


To install, require the package from composer:

composer require donejeh/nuban

#Application Service Providers...



php artisan vendor:publish --provider="Donejeh\Nuban\NubapiServiceProvider" --tag="config"

Once run, you should see a new nubapi.php file in your config folder, with contents that look like this:

// config for donejeh/nuban
return [
// The Host of the API.
'host' => env('NUB_API_HOST', ''),
* Your API Token from (
'api_token' => env('NUB_API_TOKEN', ''),
'options' => [
// Validate number on your server without making an APi request.
'validate_number_locally' => true,
//This timeout applies to client connections and determine when
//The whole response must be read before it exceeded
'request_timeout' => 5,

#APi Token

This is your API token from (nubapi is completely free for personal, commercial and open source projects.)

#API Usage

Make sure you obtain your API key and configure your API Token in your application, you can now in your Laravel application controller add the following code:

use Donejeh\Nuban\Nubapi;
$nubanApi = app(NubanApi::class);
$response = $nubanApi->getAccountDetails('1056684123', '013');