PHPackages                             cecula/vereafy - 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. cecula/vereafy

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

cecula/vereafy
==============

A PHP Library for Integrating with Vereafy Two-Factor Authentication (2FA) Service

1.0.1(7y ago)012MITPHPPHP &gt;=5.4.0

Since Apr 6Pushed 7y agoCompare

[ Source](https://github.com/cecula-vereafy/php-library)[ Packagist](https://packagist.org/packages/cecula/vereafy)[ Docs](https://www.cecula.com/vereafy)[ RSS](/packages/cecula-vereafy/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (2)DependenciesVersions (3)Used By (0)

Vereafy PHP Library
===================

[](#vereafy-php-library)

- [Vereafy PHP Library](#vereafy-php-library)
    - [Introduction](#introduction)
    - [Installation](#installation)
        - [Installing with Composer](#installing-with-composer)
        - [Installing from GitHub](#installing-from-github)
    - [Including Library in Project](#including-library-in-project)
    - [How to Get API Key](#how-to-get-api-key)
    - [Initialization](#initialization)
    - [Completion](#completion)
    - [Resend](#resend)
    - [Get Balance](#get-balance)
    - [Error Responses](#error-responses)

---

Introduction
------------

[](#introduction)

Vereafy is an SMS based 2-factor authentication services that uses machine learning to understand the causes of OTP delivery failures and resolves them instantly to ensure your login and sign up OTPs deliver.

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

[](#installation)

The Vereafy PHP Library Project was created to enable PHP Developers integrate seamlessly with the Vereafy API.

To use the Vereafy PHP library, you just need to clone this repo into your existing project directory and require the Vereafy class file (Vereafy.php) or install with composer.

#### Installing with Composer

[](#installing-with-composer)

```
composer require cecula/vereafy

```

#### Installing from GitHub

[](#installing-from-github)

```
git clone https://github.com/cecula-vereafy/php-library vereafy

```

\##Including Library in Project If you installed the Vereafy Library using composer, use the following line to include project:

```
require_once "/path/to/vendor/autoload.php";

```

otherwise, if you cloned the GitHub repo you can simply require the project from the directory you save it to

```
require_once "/path/to/vereafy/Vereafy.php"

```

How to Get API Key
------------------

[](#how-to-get-api-key)

Your API Key is first generated when you register an app. To register an app, Login to the Developers Dashboard, Navigate to **Apps &gt; Add**, Type the name of your app and click **Submit**. The app will be registered and a new API Key will be generated. Copy the API key into your project.

OR

Click [developer.cecula.com](https://developer.cecula.com/docs/introduction/generating-api-key) to get started.

Initialization
--------------

[](#initialization)

The Vereafy 2FA initialization can be as simple as the following lines of code:

```
     $vereafyInstance = new Vereafy();
     $vereafyInstance->init();

```

The initialization method returns a response that should look like this:

```
         {
            "status":"success",
             "pinRef": "1293488527"
         }

```

Completion
----------

[](#completion)

The Vereafy 2FA completion can be as simple as the following lines of code:

```
     $vereafyInstance = new Vereafy();
     $vereafyInstance->complete(, );

```

The completion method returns a response that should look like this if the parameters are correct:

```
         {
            "response":"success"
         }

```

Resend
------

[](#resend)

In a case where your app users get impatient and hits the retry link on your app form, just call the resend method this way:

```
     $vereafyInstance = new Vereafy();
     $vereafyInstance->resend(, );

```

The resend method returns a response that should look like this:

```
         {
             "status": "success",
             "pinRef": 1293488527
         }

```

Get Balance
-----------

[](#get-balance)

To get your balance on Vereafy, the getbalance method is used this way:

```
        $vereafyInstance = new Vereafy();
        $vereafyInstance->getBalance();

```

The method requires no parameter, and the returned response should look like this:

```
        {
             "balance":1507
        }

```

Error Responses
---------------

[](#error-responses)

In a case where the request fails due to one reason or another you should get an error response from the requested endpoint that looks like this:

```
        {
            "error":"Invalid PIN Ref",
            "code":"CE2000"
        }

```

The table below shows a list of error codes and their descriptions

Error CodeDescriptionCE1001Missing FieldsCE1002Empty FieldsCE1006Not a Nigerian NumberCE2000Invalid PIN RefCE2002PIN does not reference any verification requestCE2003Mobile number does not match original requestCE2001Invalid PINCE2004Request Not FoundCE7000Verification already succeededCE7001Verification already failedCE6000Insufficient BalanceCE5000Invalid Template IDCE5001Could not find referenced template

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~0 days

Total

2

Last Release

2595d ago

PHP version history (2 changes)1.0.0PHP ^5.4.0

1.0.1PHP &gt;=5.4.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/32046404388def9a9a99677a67ff43a5bcf77756efe367db4583bc705a648196?d=identicon)[vereafy](/maintainers/vereafy)

---

Top Contributors

[![bbnplace](https://avatars.githubusercontent.com/u/3621257?v=4)](https://github.com/bbnplace "bbnplace (18 commits)")

---

Tags

Authentication2faTwo Factor Authenticationtwo-factortfa2 factor authenticationCeculaVereafyVereafy PHPCecula PHP

### Embed Badge

![Health badge](/badges/cecula-vereafy/health.svg)

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

###  Alternatives

[pragmarx/google2fa

A One Time Password Authentication package, compatible with Google Authenticator.

2.0k82.4M164](/packages/pragmarx-google2fa)[robthree/twofactorauth

Two Factor Authentication

1.2k10.5M66](/packages/robthree-twofactorauth)[pragmarx/google2fa-qrcode

QR Code package for Google2FA

12024.6M37](/packages/pragmarx-google2fa-qrcode)[paragonie/multi-factor

Vendor-agnostic two-factor authentication library

142195.5k2](/packages/paragonie-multi-factor)[markshust/magento2-module-disabletwofactorauth

The DisableTwoFactorAuth module provides the ability to disable two-factor authentication.

2282.7M6](/packages/markshust-magento2-module-disabletwofactorauth)[laragear/two-factor

On-premises 2FA Authentication for out-of-the-box.

339785.3k8](/packages/laragear-two-factor)

PHPackages © 2026

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