plesk/api-php-lib

How to install let's encrypt or SSL

sihamzsiham opened this issue · 2 comments

Hello,
How to install certifiact let's encrypt or SSL for a site using Pesk API ?
I can't find a solution.

Hello,
Since then @sihamzsiham , did you find any solution ?
Thanks

After encountering the same problem, our team came up with the following solution for enabling letsencrypt SSL (although using cli). It makes use of the cli endpoint offered by the REST JSON api.
$response = Http::timeout(360)->withBasicAuth($user, $pass)->post("https://panel:8443/api/v2/cli/extension/call", [ "params" => [ "--exec", "letsencrypt", "cli.php", "-m", $letsEncryptEmail, "-d", $domainUrl ] ]);