API Configuration
Configure API integration between PteroCA and Pterodactyl panel.
Overview
PteroCA integrates with Pterodactyl to provide server management functionality. This integration requires:
PteroCA addon installed in Pterodactyl
Application API key with full permissions
Correct API configuration in PteroCA
Prerequisites
Pterodactyl panel installed and running
Admin access to Pterodactyl panel
Composer access to Pterodactyl server
Step 1: Install PteroCA Addon
The PteroCA addon is required for full functionality. It enables Client API key creation through the API, which standard Pterodactyl doesn't support.
Complete installation guide: PteroCA Pterodactyl Addon
The addon installation guide includes:
Detailed installation steps with verification
Post-installation configuration
Version compatibility information
Troubleshooting common issues
Security best practices
Once the addon is installed and verified, proceed to create the API key below.
Step 2: Create API Key
Create an Application API key in Pterodactyl with full permissions.
Via Pterodactyl Admin Panel
Log into Pterodactyl panel as administrator
Navigate to Admin → Application API
Click "Create New"
Configure the API key:
Description: "PteroCA Integration" (or any identifying name)
Permissions: Select ALL read & write permissions
Users (Read & Write)
Nodes (Read & Write)
Allocations (Read & Write)
Servers (Read & Write)
Nests (Read & Write)
Eggs (Read & Write)
Locations (Read & Write)
Click "Create Credentials"
Copy the API key - It will only be shown once!
Format:
ptlc_****************************Store securely - you'll need this for PteroCA configuration
Required Permissions
The API key must have ALL read & write permissions:
✅ Users (Read & Write)
✅ Nodes (Read & Write)
✅ Allocations (Read & Write)
✅ Servers (Read & Write)
✅ Nests (Read & Write)
✅ Eggs (Read & Write)
✅ Locations (Read & Write)
Missing any permission will cause PteroCA features to fail.
Step 3: Configure in PteroCA
Add the Pterodactyl API credentials to PteroCA.
Method 1: Via System Configuration Command
During initial setup, run:
When prompted for Pterodactyl credentials:
Pterodactyl Panel URL:
https://panel.pterodactyl.ioPterodactyl API Key:
ptlc_****************************
Method 2: Via Admin Panel
After installation:
Navigate to Settings → Pterodactyl
Update:
Panel URL: Your Pterodactyl panel URL
API Key: Your Application API key
Click Save
Verifying API Connection
Test API Connection
After configuration, verify the connection works:
Check Admin Dashboard
Navigate to Admin Dashboard
Look for Pterodactyl connection status
Try Creating a Server
Go to Store/Shop
Configure and purchase a server
Check if server is created in Pterodactyl
Test via CLI
Check API Response
Manually test the API using curl:
Should return JSON list of users.
Troubleshooting
API Connection Failed
Error: "Cannot connect to Pterodactyl API"
Solutions:
Verify URL is correct
Should return 401 (unauthorized) not connection error
Check API key format
Should start with
ptlc_No extra spaces or characters
Full key copied (not truncated)
Verify API key has permissions
Check in Pterodactyl Admin → Application API
Ensure ALL permissions are checked
Test with curl
Server Creation Fails
Error: "Failed to create server in Pterodactyl"
Possible Causes:
Missing API permissions
Verify API key has Servers (Write) permission
Invalid egg/nest configuration
Check product configuration in PteroCA
Verify egg exists in Pterodactyl
Allocation not available
Ensure node has available allocations
Check allocation is not already in use
Node offline or full
Verify node status in Pterodactyl
Check available disk/memory
User Synchronization Issues
Error: "Cannot create Pterodactyl user"
Solutions:
Verify addon is installed
Check API key has Users (Write) permission
Test user creation manually
SSL Certificate Errors
Error: "SSL certificate problem"
Solutions:
Verify Pterodactyl has valid SSL
Update CA certificates
Check certificate is not self-signed
Use Let's Encrypt or valid SSL certificate
Self-signed certificates may cause issues
Security Best Practices
API Key Security
Never commit API keys to version control
Add
.envto.gitignoreUse environment variables
Regenerate compromised keys immediately
Revoke old key in Pterodactyl
Create new key
Update in PteroCA
Use separate keys for testing
Development environment: separate API key
Production environment: dedicated API key
Monitor API usage
Review API logs in Pterodactyl
Watch for unusual activity
Network Security
Use HTTPS only
Never use HTTP for API communication
Encrypt all traffic
Firewall rules
Allow API traffic between PteroCA and Pterodactyl
Block unnecessary external access
Keep software updated
Regularly update Pterodactyl
Update PteroCA addon
Apply security patches promptly
API Rate Limiting
Pterodactyl has API rate limits to prevent abuse:
Default: 240 requests per minute
Burst: Up to 1000 requests (with cooldown)
If you hit rate limits:
Reduce polling frequency in PteroCA
Implement caching for frequently accessed data
Use webhooks instead of polling (when available)
Contact Pterodactyl admin to adjust limits if needed
Related Guides
Allowed Origins Configuration - Enable console access
PteroCA Pterodactyl Addon - Addon documentation
System Configuration - Complete system setup
Troubleshooting - Common issues
Last updated