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

ActiveLibrary

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 2mo 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 54% 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

3399d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/865d0fe23bba15fc05df4a71c354017bf8d5023a3a74c041ae5840e881064427?d=identicon)[araines](/maintainers/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

[sylius/sylius

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

8.4k5.6M650](/packages/sylius-sylius)[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)[drupal/core

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

19462.3M1.3k](/packages/drupal-core)[drupal/core-recommended

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

6939.5M343](/packages/drupal-core-recommended)[googleads/googleads-php-lib

Google Ad Manager SOAP API Client Library for PHP

67410.3M25](/packages/googleads-googleads-php-lib)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.3M152](/packages/sulu-sulu)

PHPackages © 2026

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