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 today

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 35% 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

4260d 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

[aws/aws-sdk-php

AWS SDK for PHP - Use Amazon Web Services in your PHP project

6.3k543.5M2.6k](/packages/aws-aws-sdk-php)[neuron-core/neuron-ai

The PHP Agentic Framework.

2.0k656.1k38](/packages/neuron-core-neuron-ai)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3741.3M45](/packages/tencentcloud-tencentcloud-sdk-php)[tempest/framework

The PHP framework that gets out of your way.

2.2k34.4k15](/packages/tempest-framework)[ellaisys/aws-cognito

Laravel Authentication using AWS Cognito (Web and API)

123256.9k1](/packages/ellaisys-aws-cognito)[eslazarev/wildberries-sdk

Wildberries OpenAPI clients (generated).

273.0k](/packages/eslazarev-wildberries-sdk)

PHPackages © 2026

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