PHPackages                             kkbox/kkboxopenapi - 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. [API Development](/categories/api)
4. /
5. kkbox/kkboxopenapi

ActiveLibrary[API Development](/categories/api)

kkbox/kkboxopenapi
==================

KKBOX Open API PHP SDK

1.0.2(7y ago)71.5k2Apache-2.0PHPCI failing

Since Jun 1Pushed 6y ago3 watchersCompare

[ Source](https://github.com/KKBOX/OpenAPI-PHP)[ Packagist](https://packagist.org/packages/kkbox/kkboxopenapi)[ Docs](https://github.com/KKBOX/OpenAPI-PHP)[ RSS](/packages/kkbox-kkboxopenapi/feed)WikiDiscussions master Synced 4d ago

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

KKBOX Open API PHP SDK
======================

[](#kkbox-open-api-php-sdk)

[![Actions Status](https://github.com/KKBOX/OpenAPI-PHP/workflows/Test/badge.svg)](https://github.com/KKBOX/OpenAPI-PHP/actions)

The project helps you to access [KKBOX's Open API](https://developer.kkbox.com)using PHP programming languages.

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

[](#installation)

You can install the package by using [Composer](https://getcomposer.org/).

```
composer require kkbox/kkboxopenapi kkbox/kkboxopenapi

```

To use the development version, please add to your `composer.json`.

```
{
  "require": {
    "kkbox/kkboxopenapi": "dev-master"
  },
  "repositories": [
    {
      "type": "vcs",
      "url": "git@github.com:kkbox/OpenAPI-PHP.git"
    }
  ]
}
```

And then run `composer install`.

Usage
-----

[](#usage)

### instantiation

[](#instantiation)

To start using the SDK, you need to register your app in KKBOX's [developer site](https://developer.kkbox.com) and obtain a valid client ID and client secret. Then, you can create an instance of `OpenAPI`.

```
use KKBOX\KKBOXOpenAPI\OpenAPI;

$clientID = 'YOUR_CLIENT_ID';
$clientSecret = 'YOUR_CLIENT_SECRET';
$openAPI = new OpenAPI($clientID, $clientSecret);
```

### Fetch Access Token

[](#fetch-access-token)

Before doing API calls, you need to fetch an access token at first.

```
$openAPI->fetchAndUpdateAccessToken();
```

### API Calls

[](#api-calls)

When you are ready, you can make API calls like to search, or to fetch information of tracks like

```
$response = $openAPI->search('Love');
```

The SDK adopts [Guzzle HTTP client](https://github.com/guzzle/guzzle), and the response objects conform to [PSR-7 HTTP message interfaces](https://www.php-fig.org/psr/psr-7/). So, if you want to get the JSON objects from the API response, you may have code like

```
$response = $openAPI->search('Love');
$searchResults = json_decode($response->getBody());
var_dump($searchResults->tracks->data);
```

Test the Package
----------------

[](#test-the-package)

Just run `vendor/bin/phpunit`.

License
-------

[](#license)

```
Copyright 2018-2019 KKBOX Technologies Limited

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.

```

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 78.6% 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

Every ~0 days

Total

3

Last Release

2905d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/70df5f12fc72f52eafb858bc39ec0fc563335512813ec9eb7493a82459faa9e8?d=identicon)[zonble](/maintainers/zonble)

---

Top Contributors

[![zonble](https://avatars.githubusercontent.com/u/53011?v=4)](https://github.com/zonble "zonble (11 commits)")[![CQD](https://avatars.githubusercontent.com/u/94944?v=4)](https://github.com/CQD "CQD (3 commits)")

---

Tags

apikkbox

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/kkbox-kkboxopenapi/health.svg)

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

###  Alternatives

[openai-php/laravel

OpenAI PHP for Laravel is a supercharged PHP API client that allows you to interact with the Open AI API

3.7k7.6M74](/packages/openai-php-laravel)[mailchimp/transactional

458.9M16](/packages/mailchimp-transactional)[get-stream/stream-chat

A PHP client for Stream Chat (https://getstream.io/chat/)

301.8M2](/packages/get-stream-stream-chat)[convertkit/convertkitapi

Kit PHP SDK for the Kit API

2167.1k1](/packages/convertkit-convertkitapi)

PHPackages © 2026

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