Download the PHP package advanta_africa/sms_api without Composer

On this page you can find all versions of the php package advanta_africa/sms_api. 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 sms_api

Advanta Africa SMS API Package

Version

Overview

The Advanta Africa SMS API package provides a simple interface for sending SMS, checking SMS balance and retrieving delivery reports using the Advanta Africa SMS APIs. This package allows you to easily integrate SMS functionalities into your PHP applications.

Table of Contents

Installation

You can install this package via Composer. Run the following command:

Usage

Configuration

To use the package, you need to provide the API credentials and the URL for the specific endpoint you want to interact with. You can pass the URL, API key, partner ID and sender ID directly when creating an instance of the package. These crednetials are accessible in your Advanta Africa SMS account. You can contact them for account creation

Sending SMS

To send a single SMS, you can use the sendSingleSmsPost method for POST requests or sendSingleSmsGet for GET requests. Both methods accept mobile numbers and a message. Optionally, you can pass timeToSend to schedule messages (or pass null if not being scheduled) and a hashed key = true when sending to hashed numbers.

POST Example

You can pass a single number or a comma separated set of numbers (Numbers can start with 07, 0 or 254):

GET Example

Send OTP Endpoint usage

When using the otp endpoint, you can use the same sendSingleSmsPost method for POST requests or sendSingleSmsGet for GET requests. This is the same endpoint for sending SMS to hashed numbers. You will need to pass hashed key and value true. If not passed, it will be treated as a regular mobile number.

POST Example

To send an SMS to a hashed mobile number using OTP endpoint:

To send to a regular number using OTP endpoint:

GET Example

To send an SMS to a hashed mobile number using OTP endpoint:

To send to a regular number using OTP endpoint:

Sending Bulk SMS

To send multiple SMS messages in a single request, use the sendBulkSms method. This method requires an array of SMS details and is only available via POST.

Example

Getting Balance

To check your SMS balance, you can use the getBalancePost method for POST requests or getBalanceGet for GET requests.

POST Example

GET Example

Getting Delivery Reports

To retrieve the delivery status of an SMS, you can use the getDeliveryStatusPost for POST requests or getDeliveryStatusGet for GET requests.

POST Example

GET Example

Endpoints

Important Notes

Author

Harold Kerry Omondi Email: [email protected]

License

This package is licensed under the MIT License.



All versions of sms_api with dependencies

PHP Build Version
Package Version
Requires php Version >=7.4
guzzlehttp/guzzle Version ^7.9
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 advanta_africa/sms_api contains the following files

Loading the files please wait ....