Download the PHP package timothydake/nigeriabulksms-sdk without Composer

On this page you can find all versions of the php package timothydake/nigeriabulksms-sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package nigeriabulksms-sdk

NigeriaBulkSMS PHP SDK

A production-grade PHP SDK for the NigeriaBulkSMS.com API. This SDK provides a simple, robust, and type-safe way to integrate bulk SMS, voice messaging, and data fetching functionalities into your PHP and Laravel applications.

Features

Installation

This SDK can be installed via Composer.

Replace your-vendor-name with your desired vendor name when publishing the package.

Basic Usage (PHP)

First, initialize the NigeriaBulkSMS client with your username and password.

Laravel Integration

1. Publish the Configuration File

After installing the package, publish the configuration file using the artisan command:

This will create a nigeriabulksms.php file in your config directory. You can then set your API credentials in your .env file:

2. Usage in Laravel

You can use the NigeriaBulkSMS facade or inject the NigeriaBulkSMS class directly.

Using the Facade

Using Dependency Injection

API Reference

NigeriaBulkSMS Client

The main client class to interact with the NigeriaBulkSMS API.

SMS Service

Access SMS functionalities via $client->sms().

send(string $message, string $sender, string|array $mobiles)

Sends a text message to one or more mobile numbers.

Call Service

Access call functionalities via $client->call().

sendTTS(string $message, string $sender, string|array $mobiles)

Sends a Text-to-Speech (TTS) call to one or more mobile numbers.

sendAudio(string $audioReference, string $sender, string|array $mobiles)

Sends a pre-recorded audio call to one or more mobile numbers using an audio reference.

Audio Service

Access audio functionalities via $client->audio().

upload(string $url)

Uploads an audio file from a given URL to the NigeriaBulkSMS platform.

Data Fetcher Service

Access data fetching functionalities via $client->dataFetcher().

getBalance()

Retrieves the current account balance.

getProfile()

Retrieves the customer profile information.

getContacts()

Retrieves the list of contacts.

getNumbers()

Retrieves the list of saved numbers.

getGroups()

Retrieves the list of groups.

getAudios()

Retrieves the list of saved audio files.

getHistory()

Retrieves the message history.

getScheduled()

Retrieves the list of scheduled messages.

getReports()

Retrieves the delivery reports.

getPayments()

Retrieves the payment history.

Error Handling

The SDK throws NigeriaBulkSMSException for API-specific errors. You should wrap your API calls in try-catch blocks to handle these exceptions gracefully.

Common error codes are:

For a full list of error codes, refer to the official NigeriaBulkSMS API documentation.

Contributing

Feel free to contribute to this SDK by submitting issues or pull requests on GitHub.

License

This SDK is open-sourced software licensed under the MIT license.


Author: Timothy Dake


All versions of nigeriabulksms-sdk with dependencies

PHP Build Version
Package Version
Requires php Version >=7.4
guzzlehttp/guzzle Version ^7.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package timothydake/nigeriabulksms-sdk contains the following files

Loading the files please wait ....