PHPackages                             yemrealtanay/webex-sms - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. yemrealtanay/webex-sms

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

yemrealtanay/webex-sms
======================

Webex Interact SMS for Laravel

v0.1.0(10mo ago)10MITPHPPHP ^8.0

Since Sep 3Pushed 10mo agoCompare

[ Source](https://github.com/yemrealtanay/webex-sms)[ Packagist](https://packagist.org/packages/yemrealtanay/webex-sms)[ RSS](/packages/yemrealtanay-webex-sms/feed)WikiDiscussions main Synced today

READMEChangelogDependencies (2)Versions (2)Used By (0)

Webex SMS for Laravel
=====================

[](#webex-sms-for-laravel)

[![Latest Version on Packagist](https://camo.githubusercontent.com/25a0784494e57cb7d620b3e031d6593823d50b3e9700e5bd03302d64b683e6b3/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f79656d7265616c74616e61792f77656265782d736d732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/yemrealtanay/webex-sms)[![Total Downloads](https://camo.githubusercontent.com/13fe67e30803557959cc5e4907bf62a494f388daeecb819745155afab68becb1/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f79656d7265616c74616e61792f77656265782d736d732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/yemrealtanay/webex-sms)

A Laravel package that provides a clean integration with the **Webex Interact SMS API**.
It includes a lightweight HTTP client, phone number validation, precise segment/cost calculation, and webhook handling with Laravel events.

---

✨ Features
----------

[](#-features)

- Send SMS through Webex Interact API
- Normalize and validate E.164 phone numbers
- Accurate GSM-7 / Unicode segment &amp; cost calculation
- Merge fields rendering (per-recipient variables)
- Webhook controller for delivery reports and inbound messages
- Laravel events for `Submitted`, `Delivered`, `Failed`, `Clicked`, and `Inbound`
- Idempotency handling for safe webhook processing
- Ready-to-use Facade: `WebexSms::send(...)`

---

📦 Installation
--------------

[](#-installation)

```
composer require yemrealtanay/webex-sms

Publish the config:

php artisan vendor:publish --tag=webex-sms-config
```

⚙️ Configuration
----------------

[](#️-configuration)

- WEBEX\_API\_URL=
- WEBEX\_API\_KEY=your-api-key
- WEBEX\_API\_DEFAULT\_SENDER\_ID=MySender
- WEBEX\_WEBHOOK\_SECRET=super-secret-token

🚀 Usage
-------

[](#-usage)

### Sending an SMS

[](#sending-an-sms)

```
use WebexSms;
use Altanay\WebexSms\Support\SmsValidator;

$from   = SmsValidator::normalizeSender(null);
$phones = SmsValidator::normalizePhones(['+905555555555']);

$res = WebexSms::send($from, 'Hello world!', $phones, correlationId: '12345');

dd($res->request_id, $res->messages);

```

### Estimating SMS cost

[](#estimating-sms-cost)

```
use Altanay\WebexSms\Support\SmsCostCalculator;

$calc = SmsCostCalculator::estimateUnitsForRecipients(
    template: 'Hi ${firstname}, welcome!',
    phones: ['+905555555555'],
    globalMergeFields: ['firstname' => 'Yunus']
);

echo $calc['units']; // number of SMS units reserved

```

📡 Webhook Handling
------------------

[](#-webhook-handling)

This package ships with a webhook endpoint at:

```
POST /webhooks/webex-sms

```

It automatically:

- Verifies the initial subscription challenge
- Ensures idempotency (no duplicate processing)
- Dispatches Laravel events:
- SmsSubmitted
- SmsDelivered
- SmsFailed
- SmsClicked
- SmsInbound

### Example listener

[](#example-listener)

```
namespace App\Listeners;

use Altanay\WebexSms\Events\SmsDelivered;
use Illuminate\Support\Facades\Log;

class MarkSmsDelivered
{
    public function handle(SmsDelivered $event)
    {
        Log::info('SMS delivered', [
            'tx' => $event->transactionId,
            'cid' => $event->correlationId,
            'msisdn' => $event->phoneNumber,
        ]);
    }
}

```

Register your listeners in EventServiceProvider.

🤝 Contributing
--------------

[](#-contributing)

Contributions are very welcome! If you’d like to improve the package, fix a bug, or add a feature:

1. Fork the repository
2. Create a feature branch (git checkout -b feature/my-feature)
3. Commit your changes (git commit -m 'Add new feature')
4. Push to the branch (git push origin feature/my-feature)
5. Open a Pull Request

We aim to keep this package community-driven, so ideas and contributions are encouraged.

###  Health Score

24

—

LowBetter than 31% of packages

Maintenance55

Moderate activity, may be stable

Popularity2

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity31

Early-stage or recently created project

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

304d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/23504590?v=4)[Yunus Emre Altanay](/maintainers/yemrealtanay)[@yemrealtanay](https://github.com/yemrealtanay)

### Embed Badge

![Health badge](/badges/yemrealtanay-webex-sms/health.svg)

```
[![Health](https://phpackages.com/badges/yemrealtanay-webex-sms/health.svg)](https://phpackages.com/packages/yemrealtanay-webex-sms)
```

###  Alternatives

[craftcms/cms

Craft CMS

3.6k3.6M3.1k](/packages/craftcms-cms)[spatie/laravel-export

Create a static site bundle from a Laravel app

674146.0k6](/packages/spatie-laravel-export)[nativephp/mobile

NativePHP for Mobile

1.1k75.1k91](/packages/nativephp-mobile)[venturedrake/laravel-crm

A free open source CRM built as a package for laravel projects

43311.2k](/packages/venturedrake-laravel-crm)[flarum/core

Delightfully simple forum software.

201.4M2.3k](/packages/flarum-core)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
