PHPackages                             sportlobster/digits - 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. sportlobster/digits

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

sportlobster/digits
===================

PHP library for Digits by Twitter

v0.3.0(9y ago)137.2k1MITPHPPHP ^5.6|^7.0CI failing

Since Jan 5Pushed 9y ago1 watchersCompare

[ Source](https://github.com/sportlobster/digits-php)[ Packagist](https://packagist.org/packages/sportlobster/digits)[ RSS](/packages/sportlobster-digits/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (3)Dependencies (6)Versions (4)Used By (0)

Digits
======

[](#digits)

[ ![Codeship Status for sportlobster/digits-php](https://camo.githubusercontent.com/dd83d71e86f44ed1bb075b3ed09a007ddab9ee35b0b813ccb87a051d04860ebf/68747470733a2f2f636f6465736869702e636f6d2f70726f6a656374732f37623834623438302d623461382d303133342d303831372d3636356330356135613866382f7374617475733f6272616e63683d6d6173746572)](https://codeship.com/projects/193797)

PHP library for [Digits by Twitter](https://get.digits.com/).

Usage
-----

[](#usage)

Simple example of server side verification:

```
use Sportlobster\Digits\Client;
use Sportlobster\Digits\Exception\AuthenticationException;

$client = Client('YOUR_DIGITS_CONSUMER_KEY');

// Verify a user via OAuth Echo
try {
    $user = $client->verify($echoUrl, $echoAuth);
} catch (AuthenticationException $e) {
    // User could not be authenticated
}

// Get details about the user
$user->getId();
$user->getPhoneNumber();

// Get details about the user's OAuth token
$accessToken = $user->getAccessToken();
$accessToken->getToken();
$accessToken->getSecret();

```

The underlying HTTP client (Guzzle) can be configured. This allows the ability to set request timeout options, proxies etc.

```
use Sportlobster\Digits\Client;

// See http://docs.guzzlephp.org/en/latest/request-options.html
$options = [
    'connect_timeout' => 3.14,
    'proxy' => 'tcp://localhost:8125',
];

$client = Client('YOUR_DIGITS_CONSUMER_KEY', $options);

```

In some scenarios you may have more than one set of Digits Keys that you wish to permit signing via (e.g. an iOS app and an Android app which share the same API service). In this case you can pass an array of keys to the Client instead:

```
use Sportlobster\Digits\Client;

$client = Client(['KEY1', 'KEY2', ...]);

```

Contributing
------------

[](#contributing)

Classes are all specified using PHPSpec. To run:

```
vendor/bin/phpspec run

```

Integration tests are done via PHPUnit. To run:

```
vendor/bin/phpunit

```

Code must be to standards. To run:

```
php vendor/bin/php-cs-fixer fix

```

###  Health Score

28

—

LowBetter than 52% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity24

Limited adoption so far

Community5

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

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 ~7 days

Total

3

Last Release

3448d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/8420020?v=4)[Andy Raines](/maintainers/araines)[@araines](https://github.com/araines)

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/sportlobster-digits/health.svg)

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

###  Alternatives

[drupal/core

Drupal is an open source content management platform powering millions of websites and applications.

19664.8M1.6k](/packages/drupal-core)[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.5k5.8M712](/packages/sylius-sylius)[web-auth/webauthn-lib

FIDO2/Webauthn Support For PHP

1237.8M121](/packages/web-auth-webauthn-lib)[craftcms/cms

Craft CMS

3.6k3.6M2.9k](/packages/craftcms-cms)[drupal/core-recommended

Locked core dependencies; require this project INSTEAD OF drupal/core.

6941.5M396](/packages/drupal-core-recommended)[web-auth/webauthn-framework

FIDO2/Webauthn library for PHP and Symfony Bundle.

51390.8k3](/packages/web-auth-webauthn-framework)

PHPackages © 2026

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