PHPackages                             nextscale-asia/pterodactyl-client-api - 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. nextscale-asia/pterodactyl-client-api

ActiveLibrary[API Development](/categories/api)

nextscale-asia/pterodactyl-client-api
=====================================

This package provides Application API endpoints for managing user API keys and free allocations in Pterodactyl Panel

v1.0.0(8mo ago)012MITPHPPHP ^8.0|^8.1|^8.2|^8.3

Since Oct 11Pushed 8mo agoCompare

[ Source](https://github.com/NextScale-asia/pterodactyl-client-api)[ Packagist](https://packagist.org/packages/nextscale-asia/pterodactyl-client-api)[ Docs](https://github.com/NextScale-asia/Panel-Client-API)[ RSS](/packages/nextscale-asia-pterodactyl-client-api/feed)WikiDiscussions main Synced today

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

Pterodactyl Client API
======================

[](#pterodactyl-client-api)

[![Latest Version on Packagist](https://camo.githubusercontent.com/17e70f281dce337da8f05ec9422ac45c076fdd50ab524cd6ad37ca6a998f7ce4/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6e6578747363616c652d617369612f707465726f64616374796c2d636c69656e742d6170692e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/nextscale-asia/pterodactyl-client-api)[![Total Downloads](https://camo.githubusercontent.com/9ca4dbbcfb4a1ea44997cb7666438c7728b842a2c24567a53c5ec352fe808ebe/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6e6578747363616c652d617369612f707465726f64616374796c2d636c69656e742d6170692e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/nextscale-asia/pterodactyl-client-api)

This package provides Application API endpoints for managing user API keys and free allocations in Pterodactyl Panel.

Features
--------

[](#features)

- ✅ **User API Key Management**: Allow users to manage their own API keys through application API endpoints
- ✅ **Free Allocation Listing**: Provide endpoints to list available free allocations on nodes
- ✅ **User Ownership Validation**: Middleware to ensure users can only access their own resources
- ✅ **Rate Limiting**: Max 5 API keys per user with proper validation
- ✅ **Input Validation**: Unique description per user with comprehensive validation
- ✅ **Audit Logging**: Complete audit logging for all operations
- ✅ **Easy Integration**: Simple installation via Composer

List Features
-------------

[](#list-features)

- ✅ Create API keys for users via Application API
- ✅ List user API keys with proper filtering
- ✅ Delete specific user API keys
- ✅ Comprehensive permission system (Admin ACL)
- ✅ User ownership validation middleware
- ✅ Rate limiting (max 5 API keys per user)
- ✅ Input validation with unique description per user
- ✅ Complete audit logging for all operations
- ✅ Proper error handling and responses

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

[](#installation)

You can install the package via composer: `composer require nextscale-asia/pterodactyl-client-api`

The service provider will be automatically registered. You can publish the config file with:

```
php artisan vendor:publish --provider="Byzic\PterodactylClientApi\PterodactylApiAddonServiceProvider" --tag="config"
```

This will publish the configuration file to `config/pterodactyl-client-api.php`.

API Endpoints
-------------

[](#api-endpoints)

### User API Keys

[](#user-api-keys)

MethodEndpointDescriptionGET`/api/application/users/{user}/api-keys`Get user's API keysPOST`/api/application/users/{user}/api-keys`Create new API key for userDELETE`/api/application/users/{user}/api-keys/{identifier}`Delete user's API key### Free Allocations

[](#free-allocations)

MethodEndpointDescriptionGET`/api/application/nodes/{node}/allocations/free`Get free allocations for a nodeUsage Examples
--------------

[](#usage-examples)

### Get User API Keys

[](#get-user-api-keys)

```
curl -X GET "https://your-panel.com/api/application/users/1/api-keys" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json"
```

### Create User API Key

[](#create-user-api-key)

```
curl -X POST "https://your-panel.com/api/application/users/1/api-keys" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "description": "My API Key",
    "allowed_ips": ["127.0.0.1"]
  }'
```

### Delete User API Key

[](#delete-user-api-key)

```
curl -X DELETE "https://your-panel.com/api/application/users/1/api-keys/key_identifier" \
  -H "Authorization: Bearer YOUR_API_TOKEN"
```

```
curl -X GET "https://your-panel.com/api/application/nodes/1/allocations/free" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json"
```

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

[](#configuration)

After publishing the config file, you can modify the settings in `config/pterodactyl-client-api.php`:

```
return [
    // API Key settings
    'api_key' => [
        'max_keys_per_user' => 10,
        'default_permissions' => [
            'user.read',
            'server.read',
        ],
    ],

    // Free allocation settings
    'allocations' => [
        'show_free_only' => true,
        'include_node_info' => true,
    ],
];
```

Security Features
-----------------

[](#security-features)

- **ACL Integration**: Uses Pterodactyl's built-in Admin ACL system
- **User Ownership Validation**: Middleware ensures users can only access their own resources
- **Rate Limiting**: Maximum 5 API keys per user (configurable)
- **Input Validation**: Comprehensive validation with custom error messages
- **Audit Logging**: All operations are logged for security tracking
- **IP Restrictions**: Support for limiting API key usage by IP address

Requirements
------------

[](#requirements)

- PHP ^8.0|^8.1|^8.2|^8.3
- Laravel ^9.0|^10.0|^11.0
- Pterodactyl Panel

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Credits
-------

[](#credits)

- [Byzic](https://github.com/byzic)
- [All Contributors](../../contributors)

Support
-------

[](#support)

If you discover any security vulnerabilities, please send an e-mail to .

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently. "errors": \[ { "code": "ValidationException", "status": "422", "detail": "You already have an API key with this description." } \] }

```

## Changelog

### v2.0.0
- ✅ Fixed API key creation logic to use Pterodactyl's native system
- ✅ Added comprehensive audit logging
- ✅ Implemented user ownership validation middleware
- ✅ Added unique description validation per user
- ✅ Removed unrelated FileController functionality
- ✅ Improved error handling and validation
- ✅ Added rate limiting (5 keys per user)
- ✅ Enhanced security with proper ACL integration

## License

MIT License

```

###  Health Score

33

—

LowBetter than 72% of packages

Maintenance58

Moderate activity, may be stable

Popularity7

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity50

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

Unknown

Total

1

Last Release

266d ago

### Community

Maintainers

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

---

Top Contributors

[![hieptd](https://avatars.githubusercontent.com/u/13526064?v=4)](https://github.com/hieptd "hieptd (10 commits)")

---

Tags

laravelclient apipterodactylapi-addonapi-key-managementfree-allocation

### Embed Badge

![Health badge](/badges/nextscale-asia-pterodactyl-client-api/health.svg)

```
[![Health](https://phpackages.com/badges/nextscale-asia-pterodactyl-client-api/health.svg)](https://phpackages.com/packages/nextscale-asia-pterodactyl-client-api)
```

###  Alternatives

[statamic/cms

The Statamic CMS Core Package

4.8k3.6M992](/packages/statamic-cms)[darkaonline/l5-swagger

OpenApi or Swagger integration to Laravel

3.0k37.6M133](/packages/darkaonline-l5-swagger)[knuckleswtf/scribe

Generate API documentation for humans from your Laravel codebase.✍

2.3k14.2M62](/packages/knuckleswtf-scribe)[openai-php/laravel

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

3.7k9.5M89](/packages/openai-php-laravel)[api-platform/laravel

API Platform support for Laravel

58171.6k14](/packages/api-platform-laravel)[scriptdevelop/whatsapp-manager

Paquete para manejo de WhatsApp Business API en Laravel

783.8k](/packages/scriptdevelop-whatsapp-manager)

PHPackages © 2026

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