Forbidden Access denied error
Closed this issue · 4 comments
Hello,
I am trying the example:
$cpanel = new \Gufy\CpanelPhp\Cpanel([
'host' => 'https://xx.xx.xx.xx:2087', // ip or domain complete with its protocol and port
'username' => 'root', // username of your server, it usually root.
'auth_type' => 'password', // set 'hash' or 'password'
'password' => 'my_password', // long hash or your user's password
]);
$accounts = $cpanel->listaccts(); // it will returned as array
when i var_dump the $accounts i get the following:
Client error response [url] https://xx.xx.xx.xx:2087/json-api/listaccts [status code] 403 [reason phrase] Forbidden Access denied
What am i doing wrong?
Is there something else i should do?
Thanks
please update to version v1.0.5, i have already test it locally and get successful response.
OK thanks now it works great.
I have version 1.0.5 and still receive this same error. The root/hash method works fine, but for security reasons, I would like to be able to login to user account with password method. How can we get this to work?
Thanks