'How to Disable AutoSSL feature for cpanel user from WHM using WHM API?
I have tried to disable auto SSL feature for particular cpanel from WHM using whm api through CURL. Source COde:
$query = "https://".$serverModel->root_domain.":2087/json-api/add_autossl_user_excluded_domains?api.version=1&username=" . $cpanel_username . "&domain=" . $cpanel_domain . "";
$curl = curl_init();
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
$header[0] = 'Authorization: WHM ' . $serverModel->whm_username . ':' . preg_replace("'(\r|\n)'", "", $serverModel->accesshash);
curl_setopt($curl, CURLOPT_HTTPHEADER, $header);
curl_setopt($curl, CURLOPT_URL, $query);
$result = curl_exec($curl);
curl_close($curl);
// firstly I have added the cpanel user domain as autossl excluded domain list and it's done successfully using below api link: https://api.docs.cpanel.net/openapi/whm/operation/add_autossl_user_excluded_domains/
and again tried to remove autoSSL using api link: https://api.docs.cpanel.net/openapi/whm/operation/remove_autossl_user_excluded_domains/
after running it successfully i was unable to disable AusoSSL check from whm.enter image description here Can anyone Help please?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
