dev-master
9999999-devSend SMS
MIT
The Requires
by Kreateyou Technologies Limited
v0.0.1
0.0.1.0Send SMS
MIT
The Requires
by Kreateyou Technologies Limited
Send SMS
This library requires a minimum PHP version of 5.6, (*1)
This is the PHP client library for use VumaSMS's API. To use this, you'll need a vumasms account. Sign up for free at vumasms.com. This is currently a beta release, see contributing for more information., (*2)
To use the client library you'll need to have created a VUMASMS account., (*3)
To install the PHP client library using Composer, (*4)
composer require kreateyou/vumasms
If you're using composer, make sure the autoloader is included in your project's bootstrap file:, (*5)
require_once "vendor/autoload.php";
Create a client with your API key and secret:, (*6)
$client = new \Vumasms\VumaSMS(API_KEY, API_SECRET);
To use VumaSMS's SMS API to send an SMS message, call the $client->send()
method., (*7)
The API can be called directly, using a simple array of parameters, the keys are as follows., (*8)
to // array of receipients sender // registered sender ID, default VUMA message // message scheduled_date // date to be sent can be Datetime or Cron Expression scheduled_type // date or cron
$messageBag = [ 'to' => [2547XXXXXX], 'sender' => VUMA, 'message' => 'Test message from the vumaSMS PHP Client' ]; $message = $client->send($messageBag);
The API response json data can be is as follows., (*9)
{"success":true,"details":{"type":"outbox","status":"queued","payload":{"to":["2547XXXXXX"],"message":"Your verification code for PROJECT is 3434 \n","sender":"VUMA","scheduled_date":null,"scheduled_type":null},"created_by":"17","scheduled_at":null,"updated_at":"2018-04-18 10:14:22","created_at":"2018-04-18 10:14:22","sid":"36"}};
To use the components in laravel 5.x Add the VumaSMS provider in your Providers, (*10)
Vumasms\Laravel\Providers\ServiceProvider::class,
Publish the Service provider as follow, (*11)
php artisan vendor:publish --provider "Vumasms\Laravel\Providers\ServiceProvider"
on your config folder locate the vumasms.php config change the key & secret configuration if your are usine .env configuration add your keys and secret in your .env file as follows, (*12)
# VUMA SETTINGS VUMA_API_KEY=<KEY> VUMA_API_SECRET=<SECRET>
To send SMS in laravel is as follows, (*13)
app("vumasms")->send($messageBag),
To contribute to the library, docs, or examples, [create an issue][issues] or a pull request. Please only raise issues about features marked as working in the API coverage as the rest of the code is being updated., (*14)
This library is released under the MIT License, (*15)
Send SMS
MIT
Send SMS
MIT