PHPackages                             keboola/oauth-v2-php-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. keboola/oauth-v2-php-client

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

keboola/oauth-v2-php-client
===========================

Keboola OAuth v2 API Client

6.0.0(4w ago)024.3k↓34.2%MITPHPPHP ^8.2CI passing

Since Feb 9Pushed 4w ago14 watchersCompare

[ Source](https://github.com/keboola/oauth-v2-php-client)[ Packagist](https://packagist.org/packages/keboola/oauth-v2-php-client)[ RSS](/packages/keboola-oauth-v2-php-client/feed)WikiDiscussions master Synced 2w ago

READMEChangelog (10)Dependencies (17)Versions (16)Used By (0)

OAuth v2 PHP Client
===================

[](#oauth-v2-php-client)

[![GitHub Actions](https://github.com/keboola/oauth-v2-php-client/actions/workflows/push.yml/badge.svg)](https://github.com/keboola/oauth-v2-php-client/actions/workflows/push.yml)

Keboola OAuth v2 API client, built on [`keboola/php-api-client-base`](https://github.com/keboola/php-api-client-base).

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

[](#installation)

```
composer require keboola/oauth-v2-php-client
```

Usage
-----

[](#usage)

Both clients take the API base URL and the auth token first, followed by optional, named transport options (`logger`, `backoffMaxTries`, `connectTimeout`, `requestTimeout`, `userAgent`, `requestHandler`).

### Credentials (Storage API token)

[](#credentials-storage-api-token)

```
use Keboola\OAuthV2Api\Credentials;

$credentials = new Credentials(
    'https://oauth.keboola.com',
    getenv('STORAGE_API_TOKEN'),
);

$list = $credentials->listCredentials('keboola.ex-google-drive');
```

### Manager (application token)

[](#manager-application-token)

```
use Keboola\OAuthV2Api\Manager;

$manager = new Manager(
    'https://oauth.keboola.com',
    getenv('APPLICATION_TOKEN'),
);

$components = $manager->listComponents();
```

The application token is optional. When omitted (or `null`), the client authenticates with the projected Kubernetes ServiceAccount token instead of `X-KBC-ManageApiToken`:

```
$manager = new Manager('https://oauth.keboola.com');
```

On a failed request both clients throw `Keboola\OAuthV2Api\Exception\ClientException` (a subclass of `Keboola\ApiClientBase\Exception\ClientException`), which exposes `getStatusCode()` and `getResponseBody()` for the failing response when available.

Development
-----------

[](#development)

```
docker compose run dev composer install
docker compose run dev composer ci
```

License
-------

[](#license)

MIT licensed, see [LICENSE](./LICENSE) file.

###  Health Score

59

—

FairBetter than 98% of packages

Maintenance94

Actively maintained with recent releases

Popularity26

Limited adoption so far

Community19

Small or concentrated contributor base

Maturity83

Battle-tested with a long release history

 Bus Factor2

2 contributors hold 50%+ of commits

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

Recently: every ~304 days

Total

15

Last Release

29d ago

Major Versions

1.0.0 → 2.0.02016-11-09

2.3.1 → 3.0.02022-06-08

3.0.0 → 4.0.02022-09-25

4.0.1 → 5.0.02024-05-22

5.0.2 → 6.0.02026-07-20

PHP version history (3 changes)4.0.0PHP &gt;=7.4

4.0.1PHP &gt;=8.1

6.0.0PHP ^8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/101dbf2551a0709ddab522f97669f13a2c4cc2d0a1e8d009f3af6ba80accb1a9?d=identicon)[Keboola](/maintainers/Keboola)

---

Top Contributors

[![odinuv](https://avatars.githubusercontent.com/u/4319320?v=4)](https://github.com/odinuv "odinuv (31 commits)")[![pepamartinec](https://avatars.githubusercontent.com/u/271753?v=4)](https://github.com/pepamartinec "pepamartinec (14 commits)")[![MiroCillik](https://avatars.githubusercontent.com/u/1488015?v=4)](https://github.com/MiroCillik "MiroCillik (6 commits)")[![ondrejhlavacek](https://avatars.githubusercontent.com/u/497675?v=4)](https://github.com/ondrejhlavacek "ondrejhlavacek (5 commits)")[![romantmb](https://avatars.githubusercontent.com/u/228957?v=4)](https://github.com/romantmb "romantmb (4 commits)")[![Halama](https://avatars.githubusercontent.com/u/903531?v=4)](https://github.com/Halama "Halama (3 commits)")[![ujovlado](https://avatars.githubusercontent.com/u/419849?v=4)](https://github.com/ujovlado "ujovlado (2 commits)")[![devin-ai-integration[bot]](https://avatars.githubusercontent.com/in/811515?v=4)](https://github.com/devin-ai-integration[bot] "devin-ai-integration[bot] (2 commits)")[![ErikZigo](https://avatars.githubusercontent.com/u/1726727?v=4)](https://github.com/ErikZigo "ErikZigo (1 commits)")[![kachnitel](https://avatars.githubusercontent.com/u/4067705?v=4)](https://github.com/kachnitel "kachnitel (1 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/keboola-oauth-v2-php-client/health.svg)

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

###  Alternatives

[tempest/framework

The PHP framework that gets out of your way.

2.3k37.6k21](/packages/tempest-framework)[sylius/sylius

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

8.5k6.0M777](/packages/sylius-sylius)[aws/aws-sdk-php

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

6.2k555.0M2.8k](/packages/aws-aws-sdk-php)[google/auth

Google Auth Library for PHP

1.4k302.1M240](/packages/google-auth)[neuron-core/neuron-ai

The PHP Agentic Framework.

2.0k832.6k55](/packages/neuron-core-neuron-ai)[shopware/platform

The Shopware e-commerce core

3.4k1.5M3](/packages/shopware-platform)

PHPackages © 2026

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