Skip to content

RentBetter/plivo-notifier

Repository files navigation

Plivo Notifier

Provides Plivo integration for Symfony Notifier.

Installation

  1. Install package using composer
composer require rentbetter/plivo-notifier@^6.1
  1. Add your Plivo DSN to your environment variables, e.g. in .env
PLIVO_DSN=plivo://AUTH_ID:AUTH_TOKEN@default?from=FROM
  1. Register the PlivoTransportFactory in your services.yaml
notifier.transport_factory.plivo:
   class: Symfony\Component\Notifier\Bridge\Plivo\PlivoTransportFactory
   parent: notifier.transport_factory.abstract
   tags: ['texter.transport_factory']
  1. Enable the Plivo transport in your config/packages/notifier.yaml configuration
framework:
  notifier:
    texter_transports:
      plivo: '%env(PLIVO_DSN)%'
  1. Start sending SMS in your application, see the symfony docs

DSN example

PLIVO_DSN=plivo://AUTH_ID:AUTH_TOKEN@default?from=FROM&statusUrl=URL&statusUrlMethod=METHOD

where:

  • AUTH_ID is your Plivo auth ID
  • AUTH_TOKEN is your Plivo auth token
  • FROM is your sender
  • URL (optional) is the URL to which Plivo should send delivery updates
  • METHOD (optional) is the HTTP method (GET, POST) with which Plivo should call URL

Resources