CyberPanel API Connection URL Issues and Clarifications

Hey everyone,

I’m currently working on a WordPress plugin that needs to connect with the CyberPanel API to manage user access. I’ve run into a bit of a snag, though. While I can connect to the CyberPanel API just fine using Postman, I’m struggling to get the same connection to work directly from my WordPress plugin.

I’ve already checked out a tutorial video, made sure API Access is enabled for the admin, and I’m using the correct URL (https://{{url}}:8090/cloudAPI/) for the connection. But when I try to use this URL for specific actions, like creating a new user, it just doesn’t seem to do the trick. I’ve also opened ports #80 and #443 on my server to ensure there shouldn’t be any issues with the connection.

So, I’ve got a couple of questions I’m hoping you all might be able to help with:

  1. What’s the exact URL I should use for creating a new user? I’m trying something like https://{{url}}:8090/cloudAPI/???, but I’m not sure what to put after “/cloudAPI/”.
  2. Similarly, what’s the URL for creating a new package? Again, I’m guessing it starts with https://{{url}}:8090/cloudAPI/???, but I’m stuck on the specifics.

I need to know what goes after “/cloudAPI/” in the URL for different actions, like creating users or packages, as well as modifying, suspending, editing, or deleting them. The documentation isn’t super clear on these points, and it’s crucial for my plugin to be able to perform these tasks.

Any help, clarifications, or pointers you can offer would be super appreciated. Thanks a lot for your time!


Strange if same call works via your postman, should work with WP too.

What error you get in return when running via WP?

Error: “Check API URL”

kindly share snippet of your WP code ?

A while back, I encountered a similar issue (though I’m not sure of the exact details of your situation). In my case, I established the connection through a reverse proxy, and it worked out. Depending on the logic you’re using, the ‘:8090’ could be causing a conflict.

It worked for me, so give it a try on your end. :slight_smile:

@pryce would you be so kind showing me how to do it through reverse proxy? I just don’t understand why Cyberpanel offers API connection but it doesn’t connect, it should work out of the box. I tried Postman and it works fine as you see in the screenshot above.
I used Nginx Proxy Manager as you suggested for reverse proxy but when I apply all the settings it redirects to the " CyberPanel Installed" Page and not the admin login page, so what I am doing wrong? show me how you did it on your side, I appreciate your help.

Hello, I suggest you try the following:

Access this tutorial:

If you continue to experience issues, consider establishing a secondary connection to both the backend and frontend domain.

The first option is usually effective as it has worked well for me.

Check out the image below:

Please let me know if this solved your problem. :slight_smile:

Important Tip:

You might not have noticed, but often the user expects to send request parameters directly in the URL. However, in the CyberPanel API, these parameters are sent in the request body.

Therefore, the “controller” value acts as a substitute for the parameter in the URL.

Take a look at the following example for a better understanding:

{
    "serverUserName": "admin",
    "controller": "submitWebsiteCreation",
    "domainName": "mynewsite.com",
    "package": "Default",
    "adminEmail": "[email protected]",
    "phpSelection": "PHP 7.4",
    "websiteOwner": "admin",
    "ssl": 0,
    "dkimCheck": 0,
    "openBasedir": 0
}

It’s important to be aware of this peculiarity when working with the CyberPanel API.