WHM Resellerstats to get current user bandwidth and space usage?

Saeven

Active Member
Jun 23, 2003
26
0
151
Ottawa
cPanel Access Level
Reseller Owner
Twitter
To develop a WHM plugin for myself, I've signed up for a cPanel account from ResellerClub -- everything is working well -- save for a means to discover how much space or bandwidth I have left.

The API docs list this command:
WHM API 1 Functions - resellerstats - Software Development Kit - cPanel Documentation

Seems the right one, save that when I pass my own username as its 'user' parameter, I am met with Access Denied.

Is this by design, on that API endpoint? OR, is this something that ResellerClub has done to me?

Thank you!
 

NixTree

Well-Known Member
Aug 19, 2010
413
5
143
Gods Own Country
cPanel Access Level
Root Administrator
Twitter
For plugin development I will always suggest to get a test server with root access. Do you have root access for the account ? If not try the same after getting a test server with 1 G ram and then install cpanel and test the same. Once plugin is ready , you will be able to run the plugin as reseller as well (if installed in the server).
 

Saeven

Active Member
Jun 23, 2003
26
0
151
Ottawa
cPanel Access Level
Reseller Owner
Twitter
Thanks for writing NixTree!

I got my paws on a Reseller plan from ResellerClub in order to develop. I tried to put myself in the shoes of those who'll be using the software I'm working on. Everything has gone well so far, save for resource discovery.

Resellers have API access and a resource pool; there has to be some means for them to identify how much of their quota they've distributed to plans?

Thanks for your help!
 

NixTree

Well-Known Member
Aug 19, 2010
413
5
143
Gods Own Country
cPanel Access Level
Root Administrator
Twitter
We always use test VPS for plugin developments and never tried reseller account . May be open a ticket with provider and to cpanel if provider is not giving any help
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,909
2,228
463
Hello,

The WHM API 1 function you are attempting to use is only available to the "root" user. You may want to consider a VPS or dedicated server if you want to develop plugins. We do have developer licenses available:

Developer License Application | cPanel, Inc.

Thank you.