Can't create SSL Certificate via API

jwvisser

New member
Joined
Apr 23, 2020
Messages
1
Hi guys,

I am trying to create a SSL Certificate with the option 'Free & automatic certificate from Let's Encrypt' with an API Call. According to the documentation (https://www.directadmin.com/features.php?id=1828) it should be possible.

Below you can find the php code we use for this:
Code:
$this->directAdminSDK->query("CMD_API_SSL", [
            'domain' => 'katest.example.nl',
            'action' => 'save',
            'type' => 'create',
            'request' => 'letsencrypt',
            'country' => '',
            'province' => '',
            'city' => '',
            'company' => '',
            'division' => '',
            'name' => 'katest.example.nl',
            'email' => '',
            'keysize' => '4096',
            'encryption' => 'sha256',
            'le_select0' => 'katest.example.nl',
            'le_select2' => 'mail.katest.example.nl',
            'le_select5' => 'www.katest.example.nl',
            'le_wc_select0' => 'katest.example.nl',
            'le_wc_select1' => '*.katest.example.nl',
            'certificate' => '',
            'submit' => 'save',
        ]);
Based on the directadmin post, we added a few more parameters like country, province etc. But nothing works, the certificatie is not created also there is no error or message in the user account.

I hope someone can help us out and give a working solution.
 
Top