Greets,
I successfully access cPanel API 2 functions using Perl via https://127.0.0.1:2082/xml-api/cpanel using a normal account username/password (eg, addpop etc).
I successfully access WHM API functions using Perl via https://127.0.0.1:2087/xml-api using the root username/password (eg, listaccts etc).
However, I want to access cPanel API 2 functions via WHM for all accounts hosted on the server (using the root username/password, since I don't have the user's cPanel account password), as per https://documentation.cpanel.net/display/SDK/cPanel+API+2+-+Calls+from+the+WHM+API :
But that fails with a 500/internal server error:
...and here we are 
I'd appreciate any pointers - even if it means I'm doing something stupid. Is what I'm trying possible? I read somewhere that I can access all API services using the root/pw pair, but perhaps I'm mistaken.
Thanks
Henry
I successfully access cPanel API 2 functions using Perl via https://127.0.0.1:2082/xml-api/cpanel using a normal account username/password (eg, addpop etc).
I successfully access WHM API functions using Perl via https://127.0.0.1:2087/xml-api using the root username/password (eg, listaccts etc).
However, I want to access cPanel API 2 functions via WHM for all accounts hosted on the server (using the root username/password, since I don't have the user's cPanel account password), as per https://documentation.cpanel.net/display/SDK/cPanel+API+2+-+Calls+from+the+WHM+API :
Code:
https://127.0.0.1:2087/xml-api/cpanel?cpanel_xmlapi_user=root&cpanel_xmlapi_module=Email&cpanel_xmlapi_func=listpops
Code:
Could not setuid to root at /usr/local/cpanel/Whostmgr/XMLUI/cPanel.pm line 82.
cpsrvd/11.48.0.9 Server at 127.0.0.1
I'd appreciate any pointers - even if it means I'm doing something stupid. Is what I'm trying possible? I read somewhere that I can access all API services using the root/pw pair, but perhaps I'm mistaken.
Thanks
Henry