rentbetter/plivo-notifier

Symfony Plivo Notifier Bridge

Installs: 3 696

Dependents: 0

Suggesters: 0

Security: 0

Stars: 2

Watchers: 1

Forks: 0

Open Issues: 0

Type:symfony-notifier-bridge

v6.1.0 2022-09-23 00:48 UTC

This package is auto-updated.

Last update: 2024-04-23 05:32:32 UTC


README

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