<https://forums.cpanel.net/threads/access-denied-using-php-xml-api.397571/>
<http://schema.org/articleBody>
"hi,\r\nI am trying to use api function using php xml-api class. \r\nI have done hours of several requests and i keep getting the following result:\r\nstring(122) \"{\"cpanelresult\":{\"apiversion\":\"2\",\"error\":\"Access denied\",\"data\":{\"reason\":\"Access denied\",\"result\":\"0\"},\"type\":\"text\"}} \"\r\n\r\nMy code is:\r\n$ip = \"my server ip\";\r\n$xmlapi = new xmlapi($ip);\r\n$xmlapi->set_port('2083');\r\n$xmlapi->set_output('json');\r\n$root_pass=\"my user password\";\r\n\r\n$xmlapi->password_auth(\"user\",$root_pass);\r\n$xmlapi->set_debug();\r\n$xmlapi->get_debug();\r\n$result= $xmlapi->xmlapi_query('showmanager');\r\nvar_dump($result);\r\n\r\nI'd be happy for any usefull information that might get me going...\r\nI tried the same using curl and it did not work."
<https://forums.cpanel.net/threads/access-denied-using-php-xml-api.397571/#post-1599412>