Simple Laravel wrapper for BandWidth API SDK.
You can install the package via composer:
composer require palpalani/laravel-bandwidth-api
You can publish and run the migrations with:
php artisan vendor:publish --provider="palPalani\LaravelBandwidthApi\LaravelBandwidthApiServiceProvider" --tag="laravel-bandwidth-api-migrations"
php artisan migrate
You can publish the config file with:
php artisan vendor:publish --provider="palPalani\LaravelBandwidthApi\LaravelBandwidthApiServiceProvider" --tag="laravel-bandwidth-api-config"
This is the contents of the published config file:
return [
'messaging' => [
'username' => env('BANDWIDTH_MESSAGING_USERNAME'),
'password' => env('BANDWIDTH_MESSAGING_PASSWORD'),
],
'voice' => [
'username' => env('BANDWIDTH_VOICE_USERNAME'),
'password' => env('BANDWIDTH_VOICE_PASSWORD'),
],
'twoFactor' => [
'username' => env('BANDWIDTH_TWO_FACTOR_USERNAME'),
'password' => env('BANDWIDTH_TWO_FACTOR_PASSWORD'),
],
'webRtc' => [
'username' => env('BANDWIDTH_WEBRTC_USERNAME'),
'password' => env('BANDWIDTH_WEBRTC_PASSWORD'),
],
];
Sending basic SMS text message using Bandwidth API.
$from = '';
$to = '';
$bandwidth = new palPalani\Bandwidth();
echo $bandwidth->sendMessage($from, $to, 'Hello, Greetings!');
Accessing dashboard API:
$bandwidth = new palPalani\Bandwidth();
$account = $bandwidth->getAccount();
composer test
Please see CHANGELOG for more information on what has changed recently.
Please see CONTRIBUTING for details.
Please review our security policy on how to report security vulnerabilities.
The MIT License (MIT). Please see License File for more information.