coursevector

Well-Known Member
Feb 23, 2015
157
20
68
cPanel Access Level
Root Administrator
I looked but couldn't find this. Is there a CLI for setting the AutoSSL options? I know you can change the SSL provider, but not the notification options. Does the API exist?

Options - User Notifications
Options - Administrator Notifications
Options - Allow AutoSSL to replace invalid or expiring non-AutoSSL certificates.
 

cPanelHB

Technical Analyst
Staff member
Sep 6, 2018
42
7
83
Houston
cPanel Access Level
Root Administrator
Hello,

If you have root access to the server, you can use the whmapi1 command "set_autossl_metadata_key".

We have documentation here on how to use it.


Note that this changes the server-wide settings.

If an individual user wants to tweak their own "User Notifications" separately from the server defaults, there is a cpapi2 call for that:


Please let us know if you have any further questions regarding this.
 

cPanelHB

Technical Analyst
Staff member
Sep 6, 2018
42
7
83
Houston
cPanel Access Level
Root Administrator
Hello,

I can.

Notify the user for all AutoSSL events and normal successes -- This radio option sets all of the user level notify keys to 1.

Notify the user for AutoSSL certificate request failures, warnings, and deferrals. -- This one sets the following combination of keys:

Code:
    "notify_autossl_expiry_coverage_user": 1,
    "notify_autossl_expiry_user": 1,
    "notify_autossl_renewal_coverage_reduced_user": 1,
    "notify_autossl_renewal_coverage_user": 1,
    "notify_autossl_renewal_uncovered_domains_user": 1,
    "notify_autossl_renewal_user": 0
Notify the user for AutoSSL certificate request failures only -- This sets the following combination of keys:

Code:
    "notify_autossl_expiry_coverage_user": 1,
    "notify_autossl_expiry_user": 1,
    "notify_autossl_renewal_coverage_reduced_user": 1,
    "notify_autossl_renewal_coverage_user": 1,
    "notify_autossl_renewal_uncovered_domains_user": 0,
    "notify_autossl_renewal_user": 0
Disable AutoSSL user notifications -- sets all of the user level notify keys to 0.

The same goes for the Administrator notifications, but using the administrator keys rather than the user keys.

I hope this clarifies things.
 

coursevector

Well-Known Member
Feb 23, 2015
157
20
68
cPanel Access Level
Root Administrator
This helps, I assume the same is true for the non-user ones? And it took me a second to figure out the difference between set_autossl_metadata_key and set_autossl_metadata, where the latter is (semi) deprecated. But I noticed in the documentation for set_autossl_metadata_key it doesn't list notify_autossl_renewal_user whereas set_autossl_metadata does. Maybe you could get someone to verify the documentation between the two if they are equivalent APIs? Thanks!