Hi,
I have previous had the hestia api working using the below request.
But now the api returns ‘10’.
I have create the access and secrets keys both with the web interface and with v-add-access-key ‘admin’ ‘*’. Both of them returned 10 from the api.
$hst_returncode = 'yes';
$hst_command = 'v-add-user';
$hash = 'access_key:secret';
// Prepare POST query
$postvars = array(
'hash' => $hash,
'returncode' => $hst_returncode,
'cmd' => $hst_command,
'arg1' => $username,
'arg2' => $password,
'arg3' => $email,
'arg4' => $package,
'arg5' => $first_name,
'arg6' => $last_name
);
// Send POST query via cURL
$postdata = http_build_query($postvars);
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, 'https://panel.apexit.uk:8083/api/');
curl_setopt($curl, CURLOPT_RETURNTRANSFER,true);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, $postdata);
$answer = curl_exec($curl);