PHPackages                             cecula/vereafy-laravel - 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. [API Development](/categories/api)
4. /
5. cecula/vereafy-laravel

ActiveLibrary[API Development](/categories/api)

cecula/vereafy-laravel
======================

This package is to enable Laravel Developers integrate seamlessly with the Vereafy API

v1.0.1(7y ago)010MITPHP

Since Apr 5Pushed 7y agoCompare

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

READMEChangelogDependencies (1)Versions (3)Used By (0)

Vereafy Laravel Library
-----------------------

[](#vereafy-laravel-library)

[![Latest Version](https://camo.githubusercontent.com/2e0dea74060f9088441e20f7f2a3566eaca71d8a06e8085aca5f99677872de7b/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f636563756c612d766572656166792f6c61726176656c2d6c6962726172792e7376673f7374796c653d666c61742d737175617265)](https://github.com/cecula-vereafy/laravel-library/releases)

- Introduction
- Initialization
- Completion
- Resend
- Get Balance
- 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.

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

To use the Vereafy Laravel library, you just need to clone this repo into your existing project directory and do composer install in other to install the dependency

### 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
--

[](#or)

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

### To Integrate Differently

[](#to-integrate-differently)

Place this at the top of your file :

```
require 'vendor/autoload.php'; //Require php autoload
use Illuminate\Guzzlehttp\guzzle;
use GuzzleHttp\Client;    // Initialize Guzzle client
use GuzzleHttp\Psr7\Request;

$client = new \GuzzleHttp\Client();

$method = 'POST';
$url = 'https://api.cecula.com/twofactor/init';
$header = Array(
    'Content-Type' => 'application/json',
    'authorization' => 'Bearer' // Paste your key here
);
```

### Initialization

[](#initialization)

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

```
     $body = Array(
    'mobile' => ''

);
$response = $client->request($method, $url, [
    'headers'        => $header,
    'json'  => $body,
]);
    echo $response->getBody();
```

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:

```
     $body = Array(
    'pinRef' => '',
    'token' => ''
);

$response = $client->request($method, $url, [
    'headers'        => $header,
    'json'  => $body,
]);

    echo $response->getBody();
```

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:

```
     $body = Array(
    'pinRef' => '',
    'mobile' => ''
);

$response = $client->request($method, $url, [
    'headers'        => $header,
    'json'  => $body,
]);

    echo $response->getBody();
```

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:

```
        $response = $client->request($method, $url, [
    'headers'        => $header,
]);

    echo $response->getBody();
```

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

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 60% 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

2596d ago

### Community

Maintainers

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

---

Top Contributors

[![vereafy](https://avatars.githubusercontent.com/u/48802949?v=4)](https://github.com/vereafy "vereafy (3 commits)")[![okandeji2012](https://avatars.githubusercontent.com/u/48822339?v=4)](https://github.com/okandeji2012 "okandeji2012 (2 commits)")

### Embed Badge

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

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

###  Alternatives

[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3731.2M42](/packages/tencentcloud-tencentcloud-sdk-php)[convertkit/convertkitapi

Kit PHP SDK for the Kit API

2167.1k1](/packages/convertkit-convertkitapi)[mapado/rest-client-sdk

Rest Client SDK for hydra API

1125.9k2](/packages/mapado-rest-client-sdk)

PHPackages © 2026

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