PHPackages                             softeriatech/smspro - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Mail &amp; Notifications](/categories/mail)
4. /
5. softeriatech/smspro

ActiveLibrary[Mail &amp; Notifications](/categories/mail)

softeriatech/smspro
===================

SMSPro Bulk SMS platform integration for Laravel with notification support

1.0.2(today)03↑2900%MITPHPPHP ^7.4|^8.0|^8.1|^8.2

Since Jun 11Pushed todayCompare

[ Source](https://github.com/Softeria-Tech/SMSPro-php-lib)[ Packagist](https://packagist.org/packages/softeriatech/smspro)[ Docs](https://sms.softeriatech.com)[ RSS](/packages/softeriatech-smspro/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (5)Versions (4)Used By (0)

SMSPro - Bulk SMS Platform
==========================

[](#smspro---bulk-sms-platform)

[![Latest Version on Packagist](https://camo.githubusercontent.com/592081497313083f7a680fcb29a112c203622d670c489c84535c10168ec405f9/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f736f667465726961746563682f736d7370726f2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/softeriatech/smspro)[![Total Downloads](https://camo.githubusercontent.com/c6703803f9dcc81b1d8a65913f6c07b96b006a28c89958ffee9a8c22f8a1f44f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f736f667465726961746563682f736d7370726f2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/softeriatech/smspro)[![License](https://camo.githubusercontent.com/ff16e9882baf77e5404539f9889c8eba0d54774c3b55c66ed8e1cddfc559ba8f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f736f667465726961746563682f736d7370726f2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/softeriatech/smspro)

A Laravel package for SMSPro Bulk SMS platform by Softeria Tech.

Installation
------------

[](#installation)

```
composer require softeriatech/smspro
```

Requirements
------------

[](#requirements)

- PHP 7.4 or higher
- Laravel 8.0 or higher
- GuzzleHTTP 7.0 or higher

Configuration
-------------

[](#configuration)

Publish the config file:

```
php artisan vendor:publish --provider="SofteriaTech\\SmsPro\\SmsProServiceProvider"
```

Add to your `.env` file:

```
SMSPRO_API_KEY=your-api-key
SMSPRO_SENDER_ID=your-sender-id
SMSPRO_BASE_URL=https://sms.softeriatech.com/api/v1/bulksms
SMSPRO_DEFAULT_COUNTRY_CODE=254
SMSPRO_TIMEOUT=30
```

Usage
-----

[](#usage)

### Basic Usage

[](#basic-usage)

```
use SofteriaTech\SmsPro\Facades\SmsPro;

// Send SMS to single recipient
SmsPro::send('0712509826', 'Hello, this is a test message');

// Send SMS to multiple recipients
SmsPro::send(['0712509826', '0753268299'], 'Hello everyone!');

// Send SMS with custom sender ID
SmsPro::send('0712509826', 'Hello, this is a test message', 'WEERA');

// Get account balance
$balance = SmsPro::getBalance();
echo "Balance: " . $balance['response']['credit_balance'];

// Get all sender IDs
$senderIds = SmsPro::getSenderIds();

// Get all contact groups
$groups = SmsPro::getGroups();

// Send SMS to a contact group
SmsPro::sendToGroup('1', 'Hello group message!');

// Send OTP
$result = SmsPro::sendOTP(
    '0712509826',
    'Your verification code is [otp]. Powered by sms.softeriatech.com',
    'WEERA'
);
$otp = $result['otp'];

// Verify OTP
$verified = SmsPro::verifyMobile('0712509826', $otp);

// Validate mobile number
$validated = SmsPro::validateMobile('0712509826');

// Get supported countries
$countries = SmsPro::getSupportedCountries();

// Update contact group
SmsPro::updateGroup('group_name', '0712509826,0753268299');
```

### Laravel Notifications

[](#laravel-notifications)

First, create a notification:

```
php artisan make:notification WelcomeSmsNotification
```

Then implement the notification:

```
