I'm trying to use the XMLAPI PHP (v1.0.13 obtained off the github source) class to obtain the quota for an e-mail account on the host that I'm running.
I've got the user, domain, password, port, etc. all configured correctly AFAIK, and set for JSON output using curl.
The line I'm calling is: $cpanel->xmlapi_query('get_pop_quota', array('email' => $emailaddress, 'domain' => Domain(), 'as_bytes' => '0')) where $emailaddress is a filtered out account name and Domain() is a function that returns the domain of the website.
When running, I get a URL of "http://<domain>:2082/json-api/get_pop_quota", and that produces a 404 error. Dropping the url manually into my browser gets me
{"cpanelresult":{"apiversion":"2","error":"Access denied","data":{"reason":"Access denied","result":"0"},"type":"text"}}
I'm new to this PHP module and have found it difficult to find out information about how to use it on this site... everything refers to UAPI but how does that correspond to the xmlapi in the PHP file?
But more importantly, I've searched on this but found little to actually help me understand how to resolve this, so some pointers to any relevant info would be very much appreciated. Thanks!
I've got the user, domain, password, port, etc. all configured correctly AFAIK, and set for JSON output using curl.
The line I'm calling is: $cpanel->xmlapi_query('get_pop_quota', array('email' => $emailaddress, 'domain' => Domain(), 'as_bytes' => '0')) where $emailaddress is a filtered out account name and Domain() is a function that returns the domain of the website.
When running, I get a URL of "http://<domain>:2082/json-api/get_pop_quota", and that produces a 404 error. Dropping the url manually into my browser gets me
{"cpanelresult":{"apiversion":"2","error":"Access denied","data":{"reason":"Access denied","result":"0"},"type":"text"}}
I'm new to this PHP module and have found it difficult to find out information about how to use it on this site... everything refers to UAPI but how does that correspond to the xmlapi in the PHP file?
But more importantly, I've searched on this but found little to actually help me understand how to resolve this, so some pointers to any relevant info would be very much appreciated. Thanks!