PHPackages                             vlucas/openx-oauth-client - 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. vlucas/openx-oauth-client

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

vlucas/openx-oauth-client
=========================

Modern PHP client for working with the OpenX v4 oAuth API

v1.0.0(11y ago)12184[1 issues](https://github.com/vlucas/openx-oauth-client/issues)PHP

Since Nov 4Pushed 11y ago1 watchersCompare

[ Source](https://github.com/vlucas/openx-oauth-client)[ Packagist](https://packagist.org/packages/vlucas/openx-oauth-client)[ RSS](/packages/vlucas-openx-oauth-client/feed)WikiDiscussions master Synced 1mo ago

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

OpenX oAuth API Client
======================

[](#openx-oauth-api-client)

Uses [Guzzle v4.x](https://github.com/guzzle/guzzle/tree/4.2.3) and the [oauth-subscriber plugin](https://github.com/guzzle/oauth-subscriber).

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

[](#installation)

```
php composer.phar require vlucas/openx-oauth-client

```

Usage in your code:
-------------------

[](#usage-in-your-code)

```
// Setup client and login with user
$client = new Vlucas\OpenX($consumerKey, $consumerSecret, $oauthRealm, 'http://ox-ui.example.com/ox/4.0/');
$client->login('user@example.com', 'souper-seekret-password');

// GET /account - for list of accounts
$res = $client->get('account');
var_dump($res->json());
```

You should see the JSON dumped out for the accounts endpoint. Feel free to make any other requests you want.

Be sure to [**read the OpenX API v4 Documentation**](http://docs.openx.com/api/)!

### Making HTTP Requests

[](#making-http-requests)

The OpenX client proxies all normal get/post/put/delete, etc. requests through and automatically adds the required `Cookie` header before sending the request.

```
// Makes normal request with necessary Cookie header
$res = $client->get('account');
```

### Access to the Guzzle Client

[](#access-to-the-guzzle-client)

If you need to get the base Guzzle object to make any further requests or modifications, you can:

```
// Returns the main GuzzleHttp\Client object
$guzzle = $client->getClient();
```

Please note that if you do this, the required `Cookie` header will not be attached to your requests automatically, so you will need to do this yourself with `$client->getAuthCookie()`.

Using the Example
-----------------

[](#using-the-example)

Steps to run the provided example.php:

1. `composer install --dev`
2. `cp .env.example .env`
3. Edit `.env` to add oAuth consumer key and secret, user/pass, etc.
4. Run it: `php example.php`

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity63

Established project with proven stability

 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

Unknown

Total

1

Last Release

4204d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/187?v=4)[Vance Lucas](/maintainers/vlucas)[@vlucas](https://github.com/vlucas)

---

Top Contributors

[![vlucas](https://avatars.githubusercontent.com/u/187?v=4)](https://github.com/vlucas "vlucas (2 commits)")

### Embed Badge

![Health badge](/badges/vlucas-openx-oauth-client/health.svg)

```
[![Health](https://phpackages.com/badges/vlucas-openx-oauth-client/health.svg)](https://phpackages.com/packages/vlucas-openx-oauth-client)
```

###  Alternatives

[josiasmontag/laravel-recaptchav3

Recaptcha V3 for Laravel package

2641.6M2](/packages/josiasmontag-laravel-recaptchav3)[simplesamlphp/simplesamlphp-module-oidc

A SimpleSAMLphp module adding support for the OpenID Connect protocol

5016.9k1](/packages/simplesamlphp-simplesamlphp-module-oidc)[kinde-oss/kinde-auth-php

Kinde PHP SDK for authentication

2369.5k3](/packages/kinde-oss-kinde-auth-php)[descope/descope-php

Descope SDK for PHP

3814.0k](/packages/descope-descope-php)[njoguamos/laravel-turnstile

A laravel wrapper for https://developers.cloudflare.com/turnstile/

2315.9k2](/packages/njoguamos-laravel-turnstile)[truckersmp/steam-socialite

Laravel Socialite provider for Steam OpenID.

1516.7k](/packages/truckersmp-steam-socialite)

PHPackages © 2026

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