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

ActiveLibrary[API Development](/categories/api)

xelax90/l2p-client
==================

Simple L2P API Client

v0.1.1(10y ago)025BSD-2-ClausePHP

Since Jan 20Pushed 10y ago1 watchersCompare

[ Source](https://github.com/xelax90/l2p-client)[ Packagist](https://packagist.org/packages/xelax90/l2p-client)[ RSS](/packages/xelax90-l2p-client/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (2)DependenciesVersions (3)Used By (0)

L²P API Client
==============

[](#lp-api-client)

This is a PHP implementation for the L²P API.

Token Storage
-------------

[](#token-storage)

To use this API, you have to implement a token storage which implements the `L2PClient\Storage\StorageInterface`. A Storage class using Zend Session is already provided in `L2PClient\Storage\ZendSessionStorage`.

Configuration
-------------

[](#configuration)

To run the Client, you have to create a `L2PClient\Config` object. It recieves an instance of StorageInterface and the ClientID which is provided to you by the IT Center.

Usage
-----

[](#usage)

Create an instance of `L2PClient\Client` and provide it with your configuration to use the API.

```
$storage = new L2PClient\Storage\ZendSessionStorage();
$config = new L2PClient\Config($storage, 'CLIENT_ID');
$client = new L2PClient\Client($config);

```

### Obtain token

[](#obtain-token)

To obtain an access token, you have to call the `getAccessToken` method. On the first call it will return null, since you have to get a RefreshToken first. There will be a DeviceToken stored in in the storage, that you can use to show the verification url to the user:

```
$token = $client->getAccessToken();
if($token === null){
	$deviceToken = $config->getStorage()->getDeviceToken();
	$verificationUrl = $deviceToken->buildVerificationUrl();
	sprintf('Verify here', $verificationUrl);
}

```

After the verification is done, the next call to `getAccessToken` will return an `L2PClient\Token\AccessToken`.

### Calling the API

[](#calling-the-api)

After you successfully recieved an AccessToken, you can use the `request` function to access the API:

```
var_dump($client->request('viewAllCourseInfo'));

```

###  Health Score

24

—

LowBetter than 31% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 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

Every ~0 days

Total

2

Last Release

3813d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1559538?v=4)[xelax90](/maintainers/xelax90)[@xelax90](https://github.com/xelax90)

---

Top Contributors

[![xelax90](https://avatars.githubusercontent.com/u/1559538?v=4)](https://github.com/xelax90 "xelax90 (13 commits)")

### Embed Badge

![Health badge](/badges/xelax90-l2p-client/health.svg)

```
[![Health](https://phpackages.com/badges/xelax90-l2p-client/health.svg)](https://phpackages.com/packages/xelax90-l2p-client)
```

###  Alternatives

[exsyst/swagger

A php library to manipulate Swagger specifications

35816.3M7](/packages/exsyst-swagger)[hubspot/api-client

Hubspot API client

24015.5M18](/packages/hubspot-api-client)[pocketmine/bedrock-protocol

An implementation of the Minecraft: Bedrock Edition protocol in PHP

172437.8k11](/packages/pocketmine-bedrock-protocol)[botman/driver-telegram

Telegram driver for BotMan

94452.6k6](/packages/botman-driver-telegram)

PHPackages © 2026

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