PHPackages                             rinvex/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. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. rinvex/authy

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

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.

v7.1.1(2y ago)35188.4k↑10.9%81MITPHPPHP ^8.1.0

Since Nov 15Pushed 2y ago5 watchersCompare

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

READMEChangelogDependencies (5)Versions (28)Used By (1)

Rinvex 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.

[![Packagist](https://camo.githubusercontent.com/0e930f11c87ca8863077da3a49ce1b2c040a9fcdcf30932823e1c586703703a6/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f72696e7665782f61757468792e7376673f6c6162656c3d5061636b6167697374267374796c653d666c61742d737175617265)](https://packagist.org/packages/rinvex/authy)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/9b3972b53441d2a8a3bdc8c2515a3498a8d37dcc22dc1aa597896ac46bf4bd7b/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f72696e7665782f61757468792e7376673f6c6162656c3d5363727574696e697a6572267374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/rinvex/authy/)[![Travis](https://camo.githubusercontent.com/9c68fbf915db26642a27dd4f65bd5bfcbf42aeee6ac551bcc664835582ec11e4/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f72696e7665782f61757468792e7376673f6c6162656c3d5472617669734349267374796c653d666c61742d737175617265)](https://travis-ci.org/rinvex/authy)[![StyleCI](https://camo.githubusercontent.com/f418bb82934f7663b4291149dbecbcf9aaae25f02355e5f818947ec96d6e3a77/68747470733a2f2f7374796c6563692e696f2f7265706f732f37333734303833382f736869656c64)](https://styleci.io/repos/73740838)[![License](https://camo.githubusercontent.com/6c43e7a1e0a979d58cd93f7be13012db4be5cf2b8ccea23169f38e13ba591968/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f72696e7665782f61757468792e7376673f6c6162656c3d4c6963656e7365267374796c653d666c61742d737175617265)](https://github.com/rinvex/authy/blob/develop/LICENSE)

[![Rinvex Authy](https://camo.githubusercontent.com/b5d8051e21028926dc53ce943fa56c9e9c76369e1e28815b8385f11335ff2b8d/68747470733a2f2f72696e7665782e636f6d2f6173736574732f66726f6e74656e642f6c61796f75742f696d672f70726f64756374732f72696e7665782d61757468792e706e67 "Rinvex Authy")](https://camo.githubusercontent.com/b5d8051e21028926dc53ce943fa56c9e9c76369e1e28815b8385f11335ff2b8d/68747470733a2f2f72696e7665782e636f6d2f6173736574732f66726f6e74656e642f6c61796f75742f696d672f70726f64756374732f72696e7665782d61757468792e706e67)

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

[](#table-of-contents)

- [Usage](#usage)
- [Installation](#installation)
- [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)

Usage is pretty easy and straightforward:

### Prepare requirements

[](#prepare-requirements)

```
$apiKey = 'AuthySecretKey';
$httpClient = new \GuzzleHttp\Client();
```

> **Note:** make sure to replace `AuthySecretKey` with your secret key from the installation steps.

### Authy App

[](#authy-app)

Create a new Authy app instance and interact with it:

```
$authyApp = new \Rinvex\Authy\App($httpClient, $apiKey);

$appStats = $authyApp->stats(); // Get app stats
$appDetails = $authyApp->details(); // Get app details
```

### Authy User

[](#authy-user)

Create a new Authy user instance and interact with it:

```
$authyUser = new \Rinvex\Authy\User($httpClient, $apiKey);

$user = $authyUser->register('user@domain.com', '317-338-9302', '54'); // Register user
$userActivity = $authyUser->registerActivity($user->get('user')['id'], 'cookie_login', 'Test Data'); // Register user activity
$userStatus = $authyUser->status($user->get('user')['id']); // Get user status
$userDeleted = $authyUser->delete($user->get('user')['id']); // Delete user
```

### Authy Token

[](#authy-token)

Create a new Authy token instance and interact with it:

```
$authyToken = new \Rinvex\Authy\Token($httpClient, $apiKey);

$smsTokenSent = $authyToken->send($user->get('user')['id'], 'sms'); // Send SMS token
$callTokenStarted = $authyToken->send($user->get('user')['id'], 'call'); // Start automated call
$tokenVerified = $authyToken->verify(54321, $user->get('user')['id']); // Verify token
```

### Intuitive Responses

[](#intuitive-responses)

Work Intuitively with Authy responses:

```
$body = $tokenVerified->body(); // Get all response body
$code = $tokenVerified->statusCode(); // Get response status code
$succeed = $tokenVerified->succeed(); // Check whether respose is a success
$failed = $tokenVerified->failed(); // Check whether respose is a failure
$message = $tokenVerified->message(); // Get response message
$item = $tokenVerified->get('item'); // Get response body item
$errors = $tokenVerified->errors(); // Get response errors
```

> **Note:** All authy requests return authy response, with a unified interface for your convenience, so you can interact with all responses the same way as above.

Installation
------------

[](#installation)

1. Install the package via composer:

    ```
    composer require rinvex/authy
    ```
2. If you haven't already: Register an [Authy](https://www.authy.com) account -&gt; Sign in -&gt; Access [dashboard](https://dashboard.authy.com) -&gt; Create new application -&gt; Copy your API Secret key
3. Done! You can refer to [Usage](#usage) again.

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 [help@rinvex.com](help@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)

License
-------

[](#license)

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

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

###  Health Score

46

—

FairBetter than 93% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity45

Moderate usage in the ecosystem

Community20

Small or concentrated contributor base

Maturity82

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 98% 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 ~96 days

Recently: every ~170 days

Total

26

Last Release

1050d ago

Major Versions

v2.1.1 → v3.0.02018-02-18

v3.0.2 → v4.0.02019-03-03

v4.1.2 → v5.0.02020-03-15

v5.1.1 → v6.0.02021-08-22

v6.1.0 → v7.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

v4.0.0PHP ^7.2.0

v5.0.0PHP ^7.4.0

v5.1.1PHP ^7.4.0 || ^8.0.0

v6.0.0PHP ^8.0.0

v7.0.0PHP ^8.1.0

### Community

Maintainers

![](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 (195 commits)")[![clement-michelet](https://avatars.githubusercontent.com/u/4611569?v=4)](https://github.com/clement-michelet "clement-michelet (1 commits)")[![dependabot-preview[bot]](https://avatars.githubusercontent.com/in/2141?v=4)](https://github.com/dependabot-preview[bot] "dependabot-preview[bot] (1 commits)")[![Rattone](https://avatars.githubusercontent.com/u/7362607?v=4)](https://github.com/Rattone "Rattone (1 commits)")[![Rowayda-Khayri](https://avatars.githubusercontent.com/u/17392277?v=4)](https://github.com/Rowayda-Khayri "Rowayda-Khayri (1 commits)")

---

Tags

authyphonephpsmstwiliotwo-factor-authenticationmessagesecurityAuthenticationtokenphonesmsautomatedverificationregistertwofactorauthycallrinvex

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/rinvex-authy/health.svg)

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

###  Alternatives

[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)[laravel-notification-channels/authy

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

5746.6k1](/packages/laravel-notification-channels-authy)[ellaisys/aws-cognito

AWS Cognito package that allows Auth and other related features using the AWS SDK for PHP

120220.7k1](/packages/ellaisys-aws-cognito)[telesign/telesign

TeleSign SDK

162.1M2](/packages/telesign-telesign)[salehhashemi/laravel-otp-manager

Laravel OTP manager

18713.2k](/packages/salehhashemi-laravel-otp-manager)[virgil/crypto

Virgil is a stack of security libraries (ECIES with Crypto Agility wrapped in Virgil Cryptogram) and all the necessary infrastructure to enable seamless, end-to-end encryption for any application, platform or device. See below for currently available languages and platforms. Get in touch with us to get preview access to our key infrastructure.

3618.0k2](/packages/virgil-crypto)

PHPackages © 2026

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