gijsrommers/smstools-notifier

SMSTools transport for Symfony Notifier

Maintainers

Package info

github.com/GijsRommers/smstools-notifier

Type:symfony-notifier-bridge

pkg:composer/gijsrommers/smstools-notifier

Transparency log

Statistics

Installs: 99

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v0.2.1 2026-08-18 10:47 UTC

This package is auto-updated.

Last update: 2026-08-25 06:52:53 UTC


README

An unofficial SMSTools transport for Symfony Notifier.

Installation

composer require gijsrommers/smstools-notifier

Configure the transport:

SMS_TOOLS_DSN=smstools://CLIENT_ID:CLIENT_SECRET@default?from=MyApp
# config/packages/notifier.yaml
framework:
    notifier:
        texter_transports:
            smstools: '%env(SMS_TOOLS_DSN)%'

Symfony Flex enables SmstoolsNotifierBundle and creates this configuration automatically. Applications without Flex can enable the bundle manually in config/bundles.php.

Send an SMS using Symfony's standard API:

use Symfony\Component\Notifier\Message\SmsMessage;
use Symfony\Component\Notifier\TexterInterface;

$texter->send(new SmsMessage('32470123456', 'Hello from Symfony!'));

The from value in an individual SmsMessage overrides the sender configured in the DSN. URL-encode credentials containing reserved URI characters.

Delivery webhooks

Install Symfony Webhook if it is not already present:

composer require symfony/webhook

Register the parser and configure a webhook route with the signing secret shown by SMSTools:

# config/services.yaml
services:
    GijsRommers\SmstoolsNotifier\Webhook\SmstoolsRequestParser: ~
# config/packages/webhook.yaml
framework:
    webhook:
        routing:
            smstools:
                service: GijsRommers\SmstoolsNotifier\Webhook\SmstoolsRequestParser
                secret: '%env(SMS_TOOLS_WEBHOOK_SECRET)%'

Point the SMSTools webhook at /webhook/smstools. The parser validates the X-Smstools-Timestamp and X-Smstools-Signature headers against the unmodified request body and rejects signatures older than five minutes. Delivery reports with terminal delivered/not-delivered codes are exposed as Symfony SmsEvent instances. Intermediate reports and other authenticated SMSTools events remain available as generic RemoteEvent instances.

Development

composer install
composer test

License

MIT. This package is community-maintained and is not an official SMSTools product.