Skip to content
marensovich edited this page Sep 14, 2025 · 15 revisions

Welcome to the Pterolib wiki!

Here you can learn how to start using the Pterolib library

Below you can select sections in which you can learn how to obtain the information necessary for the library's operation.

Quickstart

  • Installation

    • Gradle

dependencies {
    implementation 'me.marensovich:pterolib:1.0.0'
}
    • Maven

<dependency>
    <groupId>me.marensovich</groupId>
    <artifactId>pterolib</artifactId>
    <version>1.0.0</version>
</dependency>

Note

Don't forget to change the library version to the latest available one.
List of versions

  • Creating your first class with Pterolib

    • Using ClientAPI

public class Main {

    public static final String PANEL_ADDRESS = System.getenv("PANEL_ADDRESS");
    public static final String PANEL_CLIENT_API = System.getenv("PANEL_CLIENT_API");

    public static void main(String[] args){
        // Client initialization
        PteroClient pteroClient = new PteroClient(PANEL_ADDRESS, PANEL_CLIENT_API);
        try {
            System.out.println(
                    // Getting server details by its ID
                    pteroClient.getServerManagement().getServerDetails("Your server ID")
            );
        } catch (Exception e) { throw new RuntimeException(e); }
    }
}

Tip

PANEL_CLIENT_API you should get in your panel.
More

    • Using ApplicationAPI

      • In development, stay tuned for updates

Tip

You can use ClientAPI and ApplicationAPI modules in the same project.

FAQ

  • What is the difference between ClientAPI and ApplicationAPI

The Client API allows users to perform actions on servers they have access to. This includes server management, file operations, database management, and more.

The Application API provides administrative access to manage the entire Pterodactyl Panel. These endpoints require administrative privileges and are designed for panel automation, integration with external systems, and comprehensive server management.

  • How to get a key for ClientAPI

Click to see instructions

Open your panel site img.png

Click on your account icon img_1.png

Select the "API Credentials" tab img_2.png

Fill out the required form and click "CREATE" img_3.png

Note

The number of characters in the description must be more than 4

Caution

When creating a key, write it down immediately. It will be impossible to view the full key again.

  • How to get a key for ApplicationAPI

    • In development, stay tuned for updates