Provides Plivo integration for Symfony Notifier.
- Install package using composer
composer require rentbetter/plivo-notifier@^6.1
- Add your Plivo DSN to your environment variables, e.g. in
.env
PLIVO_DSN=plivo://AUTH_ID:AUTH_TOKEN@default?from=FROM
- Register the
PlivoTransportFactory
in yourservices.yaml
notifier.transport_factory.plivo:
class: Symfony\Component\Notifier\Bridge\Plivo\PlivoTransportFactory
parent: notifier.transport_factory.abstract
tags: ['texter.transport_factory']
- Enable the Plivo transport in your
config/packages/notifier.yaml
configuration
framework:
notifier:
texter_transports:
plivo: '%env(PLIVO_DSN)%'
- Start sending SMS in your application, see the symfony docs
PLIVO_DSN=plivo://AUTH_ID:AUTH_TOKEN@default?from=FROM&statusUrl=URL&statusUrlMethod=METHOD
where:
AUTH_ID
is your Plivo auth IDAUTH_TOKEN
is your Plivo auth tokenFROM
is your senderURL
(optional) is the URL to which Plivo should send delivery updatesMETHOD
(optional) is the HTTP method (GET, POST) with which Plivo should callURL