PHPackages                             laravel-notification-channels/authy - 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. [Mail &amp; Notifications](/categories/mail)
4. /
5. laravel-notification-channels/authy

ActiveLibrary[Mail &amp; Notifications](/categories/mail)

laravel-notification-channels/authy
===================================

Authy notification channel for Laravel, with the ability to send in-app, sms, and call verification tokens.

v10.1.0(3y ago)5746.6k15[2 PRs](https://github.com/laravel-notification-channels/authy/pulls)1MITPHPPHP ^8.1.0

Since Oct 15Pushed 3y ago3 watchersCompare

[ Source](https://github.com/laravel-notification-channels/authy)[ Packagist](https://packagist.org/packages/laravel-notification-channels/authy)[ Docs](https://rinvex.com)[ RSS](/packages/laravel-notification-channels-authy/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependencies (6)Versions (23)Used By (1)

Authy Notification Channel for Laravel
======================================

[](#authy-notification-channel-for-laravel)

[Authy](https://www.authy.com) notification channel for [Laravel](https://laravel.com), with the ability to send in-app, sms, and call verification tokens.

[![Packagist](https://camo.githubusercontent.com/4d9e2ebf05e3eba7da7c2f0f9ccd6973e11ddeff79c9154db50a0d179576f7a3/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6c61726176656c2d6e6f74696669636174696f6e2d6368616e6e656c732f61757468792e7376673f6c6162656c3d5061636b6167697374267374796c653d666c61742d737175617265)](https://packagist.org/packages/laravel-notification-channels/authy)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/d5f5871574f021853a00419d9c7168b4a6ef092d344c79d7bc39137b16a38781/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f6c61726176656c2d6e6f74696669636174696f6e2d6368616e6e656c732f61757468792e7376673f6c6162656c3d5363727574696e697a6572267374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/laravel-notification-channels/authy/)[![StyleCI](https://camo.githubusercontent.com/05fc30c4398d258115e5df2ce77a5427f9e596a85af748a82e992ee2d808444f/68747470733a2f2f7374796c6563692e696f2f7265706f732f37303834303231302f736869656c643f6272616e63683d6d6173746572)](https://styleci.io/repos/70840210)[![Travis](https://camo.githubusercontent.com/578187a90f277ceb866f67984480a2aab9600a1ed8ac57d3fa6261e41746a05e/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f6c61726176656c2d6e6f74696669636174696f6e2d6368616e6e656c732f61757468792e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/laravel-notification-channels/authy)[![License](https://camo.githubusercontent.com/ffd7c36d4bf9894058a33f0a2c1afde009932157d7c6ea293b356cd0951985dc/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6c61726176656c2d6e6f74696669636174696f6e2d6368616e6e656c732f61757468792e7376673f6c6162656c3d4c6963656e7365267374796c653d666c61742d737175617265)](https://github.com/laravel-notification-channels/authy/blob/develop/LICENSE)

[![Authy Notifications](https://camo.githubusercontent.com/ca09c72fe1b93a7edde5a8605e331918e80c67a317a94a5bcce5d620d7cf2c78/68747470733a2f2f72696e7665782e636f6d2f6173736574732f66726f6e74656e642f6c61796f75742f696d672f70726f64756374732f6c61726176656c2d6e6f74696669636174696f6e2d6368616e6e656c732d61757468792e706e67 "Authy Notification")](https://camo.githubusercontent.com/ca09c72fe1b93a7edde5a8605e331918e80c67a317a94a5bcce5d620d7cf2c78/68747470733a2f2f72696e7665782e636f6d2f6173736574732f66726f6e74656e642f6c61796f75742f696d672f70726f64756374732f6c61726176656c2d6e6f74696669636174696f6e2d6368616e6e656c732d61757468792e706e67)

Table Of Contents
-----------------

[](#table-of-contents)

- [Usage](#usage)
- [Upgrade](#upgrade)
- [Changelog](#changelog)
- [Support](#support)
- [Contributing &amp; Protocols](#contributing--protocols)
- [Security Vulnerabilities](#security-vulnerabilities)
- [About Rinvex](#about-rinvex)
- [Trademarks](#trademarks)
- [License](#license)

Usage
-----

[](#usage)

1. Install the package via composer:

    ```
    composer require laravel-notification-channels/authy
    ```
2. This package requires [`rinvex/laravel-authy`](https://github.com/rinvex/laravel-authy) package, so before proceeding make sure to follow up its [installation](https://github.com/rinvex/laravel-authy#installation) steps first.
3. Next, to route Authy notifications to the proper entity, define a `routeNotificationForAuthy` method on your notifiable entity. This should return the **Authy Id** to which the notification should be sent. Example:

    ```
    /**
     * Route notifications for the authy channel.
     *
     * @return int
     */
    public function routeNotificationForAuthy()
    {
        return $this->authy_id;
    }
    ```

    > **Note:** as you might thought, this requires an `authy_id` attribute in your notifiable entity, for which you may need to create an additional field in the database table.
4. Now you can create notifications that use Authy channel as follows:

    ```
    // app/Notifications/PhoneVerificationNotification.php

    namespace App\Notifications;

    use Illuminate\Notifications\Notification;
    use NotificationChannels\Authy\AuthyChannel;
    use NotificationChannels\Authy\AuthyMessage;

    class PhoneVerificationNotification extends Notification
    {
        /**
         * The notification method (sms/call).
         *
         * @var string
         */
        public $method;

        /**
         * Determine whether to force the notification over cellphone network.
         *
         * @var bool
         */
        public $force;

        /**
         * The notification message action.
         *
         * @var string
         */
        public $action;

        /**
         * The notification message action message.
         *
         * @var string
         */
        public $actionMessage;

        /**
         * Create a notification instance.
         *
         * @param string $method
         * @param bool   $force
         * @param string $action
         * @param string $actionMessage
         *
         * @return void
         */
        public function __construct($method = 'sms', $force = false, $action = null, $actionMessage = null)
        {
            $this->method = $method;
            $this->force = $force;
            $this->action = $action;
            $this->actionMessage = $actionMessage;
        }

        /**
         * Get the notification's channels.
         *
         * @param mixed $notifiable
         *
         * @return array|string
         */
        public function via($notifiable)
        {
            return [AuthyChannel::class];
        }

        /**
         * Build the Authy representation of the notification.
         *
         * @return \NotificationChannels\Authy\AuthyMessage
         */
        public function toAuthy()
        {
            $message = AuthyMessage::create()->method($this->method);

            if ($this->force) {
                $message->force();
            }

            if ($this->action) {
                $message->action($action);
            }

            if ($this->actionMessage) {
                $message->actionMessage($actionMessage);
            }

            return $message;
        }
    }
    ```
5. Finally you can consume the notification as follows:

    ```
    $this->notify(new \App\Notifications\PhoneVerificationNotification('sms', true));
    ```

    > **Note:** don't forget to read through [Authy TOTP API](https://docs.authy.com/totp.html) documentation for further information.
6. Done!

Upgrade
-------

[](#upgrade)

- **Upgrading To `v2.x` From `v1.x`**

    API implementation is 100% backward compatible, but sandbox API has been dropped since it's officially deprecated. Also note that PHP7 is now required.

Changelog
---------

[](#changelog)

Refer to the [Changelog](CHANGELOG.md) for a full history of the project.

Support
-------

[](#support)

The following support channels are available at your fingertips:

- [Chat on Slack](https://bit.ly/rinvex-slack)
- [Help on Email](mailto:help@rinvex.com)
- [Follow on Twitter](https://twitter.com/rinvex)

Contributing &amp; Protocols
----------------------------

[](#contributing--protocols)

Thank you for considering contributing to this project! The contribution guide can be found in [CONTRIBUTING.md](CONTRIBUTING.md).

Bug reports, feature requests, and pull requests are very welcome.

- [Versioning](CONTRIBUTING.md#versioning)
- [Pull Requests](CONTRIBUTING.md#pull-requests)
- [Coding Standards](CONTRIBUTING.md#coding-standards)
- [Feature Requests](CONTRIBUTING.md#feature-requests)
- [Git Flow](CONTRIBUTING.md#git-flow)

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

If you discover a security vulnerability within this project, please send an e-mail to [security@rinvex.com](security@rinvex.com). All security vulnerabilities will be promptly addressed.

About Rinvex
------------

[](#about-rinvex)

Rinvex is a software solutions startup, specialized in integrated enterprise solutions for SMEs established in Alexandria, Egypt since June 2016. We believe that our drive The Value, The Reach, and The Impact is what differentiates us and unleash the endless possibilities of our philosophy through the power of software. We like to call it Innovation At The Speed Of Life. That’s how we do our share of advancing humanity.

Trademarks
----------

[](#trademarks)

- [Authy™](https://www.authy.com) is a trademark of [Twilio Inc.](https://www.twilio.com)
- [Laravel™](https://laravel.com) is a trademark of [TAYLOR OTWELL](http://taylorotwell.com)

License
-------

[](#license)

This software is released under [The MIT License (MIT)](LICENSE).

(c) 2016-2020 Rinvex LLC, Some rights reserved.

###  Health Score

44

—

FairBetter than 92% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity38

Limited adoption so far

Community22

Small or concentrated contributor base

Maturity81

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 89.6% of commits — single point of failure

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

Every ~119 days

Recently: every ~214 days

Total

21

Last Release

1113d ago

Major Versions

v5.1.0 → v6.0.02019-09-22

v6.0.0 → v7.0.02020-03-15

v7.0.1 → v8.0.02020-12-21

v8.0.1 → v9.0.02021-08-22

v9.1.0 → v10.0.02023-01-08

PHP version history (8 changes)v0.0.1PHP &gt;=5.6.4

v2.0.0PHP ^7.0.0

v3.0.0PHP ^7.1.3

v5.0.0PHP ^7.2.0

v7.0.0PHP ^7.4.0

v8.0.1PHP ^7.4.0 || ^8.0.0

v9.0.0PHP ^8.0.0

v10.0.0PHP ^8.1.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/20937037?v=4)[Laravel Notification Channels](/maintainers/laravel-notification-channels)[@laravel-notification-channels](https://github.com/laravel-notification-channels)

![](https://www.gravatar.com/avatar/7e54af04bcacb96e00894621335f88df7ed9895b6cc245deffdc9830a21cfe29?d=identicon)[Omranic](/maintainers/Omranic)

---

Top Contributors

[![Omranic](https://avatars.githubusercontent.com/u/406705?v=4)](https://github.com/Omranic "Omranic (138 commits)")[![freekmurze](https://avatars.githubusercontent.com/u/483853?v=4)](https://github.com/freekmurze "freekmurze (10 commits)")[![Rowayda-Khayri](https://avatars.githubusercontent.com/u/17392277?v=4)](https://github.com/Rowayda-Khayri "Rowayda-Khayri (3 commits)")[![atymic](https://avatars.githubusercontent.com/u/50683531?v=4)](https://github.com/atymic "atymic (2 commits)")[![svenluijten](https://avatars.githubusercontent.com/u/11269635?v=4)](https://github.com/svenluijten "svenluijten (1 commits)")

---

Tags

laraveltokenphonesmsverificationauthycallrinvex

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/laravel-notification-channels-authy/health.svg)

```
[![Health](https://phpackages.com/badges/laravel-notification-channels-authy/health.svg)](https://phpackages.com/packages/laravel-notification-channels-authy)
```

###  Alternatives

[laravel-notification-channels/twilio

Provides Twilio notification channel for Laravel

2587.7M12](/packages/laravel-notification-channels-twilio)[rinvex/laravel-authy

Rinvex Authy is a simple wrapper for Authy TOTP, the best rated Two-Factor Authentication service for consumers, simplest 2fa Rest API for developers and a strong authentication platform for the enterprise.

3376.7k1](/packages/rinvex-laravel-authy)[rinvex/authy

Rinvex Authy is a simple wrapper for Authy TOTP API, the best rated Two-Factor Authentication service for consumers, simplest 2fa Rest API for developers and a strong authentication platform for the enterprise.

35188.4k1](/packages/rinvex-authy)[laravel-notification-channels/discord

Laravel notification driver for Discord.

2371.3M11](/packages/laravel-notification-channels-discord)[meness/verifi

A Laravel package to handle email verification.

5516.9k](/packages/meness-verifi)

PHPackages © 2026

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