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. yemrealtanay/webex-sms

ActiveLibrary

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

Webex Interact SMS for Laravel

v0.1.0(8mo ago)00MITPHPPHP ^8.0

Since Sep 3Pushed 8mo 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 1mo ago

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 32% of packages

Maintenance60

Regular maintenance activity

Popularity0

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity30

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

251d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/48b2e0f4fab600facc0a3466722683f053663a958eb1b302276436509b0e7fed?d=identicon)[yemrealtanay](/maintainers/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

[s-ichikawa/laravel-sendgrid-driver

This library adds a 'sendgrid' mail driver to Laravel.

4139.3M1](/packages/s-ichikawa-laravel-sendgrid-driver)[stechstudio/laravel-zipstream

A fast and simple streaming zip file downloader for Laravel.

4633.7M3](/packages/stechstudio-laravel-zipstream)[laravel-notification-channels/microsoft-teams

A Laravel Notification Channel for Microsoft Teams

1603.0M7](/packages/laravel-notification-channels-microsoft-teams)[spatie/laravel-export

Create a static site bundle from a Laravel app

646127.9k5](/packages/spatie-laravel-export)[erag/laravel-disposable-email

A Laravel package to detect and block disposable email addresses.

226102.4k](/packages/erag-laravel-disposable-email)[aedart/athenaeum

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

255.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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