cpanel-php icon indicating copy to clipboard operation
cpanel-php copied to clipboard

Error access.

Open Askeshine opened this issue 5 years ago • 0 comments

hello , i use this code.

   <?php
   require_once("vendor/autoload.php");
   $cpanel = new \Gufy\CpanelPhp\Cpanel([
       'host'        =>  'https://server01.nubewww.tech:2087', // ip or domain complete with its protocol and port
       'username'    =>  'xxxxxxxxx', // username of your server, it usually root.
       'auth_type'   =>  'xxxxxxxxxxx', // set 'hash' or 'password'
     'password'    =>  'xxxxxxxxxxxxxxxx', // long hash or your user's password
  ]);

  $accounts = $cpanel->listaccts(); // it will returned as array
  print_r($accounts);

and when i call from browser i recive this error.

Client error:POST https://server01.nubewww.tech:2087/json-api/listacctsresulted in a403 Forbidden Access deniedresponse: {"cpanelresult":{"apiversion":"2","error":"Access denied","data":{"reason":"Access denied","result":"0"},"type":"text"}} (truncated...)

Askeshine avatar Feb 21 '20 06:02 Askeshine