Welcome to Pandora FMS Community!

Find answers, ask questions, and connect with our community around the world.

  • PANDORA API-ACCESS

    Posted by Meriem on March 25, 2025 at 16:37

    Sure! Here’s a reformulation of your situation in English:

    <hr>

    Issue with Accessing the Pandora FMS API Interface

    I am unable to access the API interface for Pandora FMS through the link http://192.168.122.1/pandora_console/include/api.php due to an authentication error.

    I also cannot run the following command successfully:

    BEARER="Authorization: Bearer xxx" # Replace with your token

    URL="http://192.168.1.100/pandora_console/include/api.php" # Replace with your IP or domain

    API_QUERY="/api/v1/agent" # Replace with the API call you wish to make

    curl -k -H "$BEARER" "$URL$API_QUERY" && echo ""



    What should I do, please?

    Sergio B. replied 54 minutes ago 2 Members · 1 Reply
  • 1 Reply
  • Sergio B.

    Administrator
    March 25, 2025 at 16:49
    1467 Karma points
    Community rank: tentacle_master_icon Tentacle Master
    Like it
    Up
    0
    Down
    Drop it
    ::

    Hello,

    You need to make sure that you have the API parameters in both console and pandora_server.conf file matching.

    In the Console General Setup you will find a field API Password, make sure that field has the same password as the console_api_pass inside the pandora_server.conf file.

    Once you made sure both passwords match, execute this API check and see if you get the OK result:

    http://127.0.0.1/pandora_console/include/api.php?op=get&op2=test&apipass=1234&user=admin&pass=pandora

    Make sure to replace the values from the URL parameters for the IP and both the apiass=YOURAPIPASS, user=CONSOLEUSER&pass=CONSOLEUSERPASS

    Kind regards,

    Sergio B.