Enable AutoSSL for User X API
I have autossl disabled in feature list, i want to enable the autossl for user x Via API .
wich command should i look to ?
-
Hi @activa If you're looking to update the featurelist to allow/enable AutoSSL the whmapi1 listed here will do that for you: WHM API 1 Functions - update_featurelist - Developer Documentation - cPanel Documentation Thanks! 0 -
Hello @activa You can try running the following for the specific user: /usr/local/cpanel/bin/autossl_check --user=$user
That should override your autoSSL settings Ultimately though - you'll have to do this every three months for that user manually, the best thing to do would be to create a new package/feature list for that account so that autoSSL is run automatically.0 -
Hello @activa You can try running the following for the specific user:
/usr/local/cpanel/bin/autossl_check --user=$user
That should override your autoSSL settings Ultimately though - you'll have to do this every three months for that user manually, the best thing to do would be to create a new package/feature list for that account so that autoSSL is run automatically.
as mensioned above, we can't use two packages, in fact we want to offer the Auto-SSL as addon for our package, until now we do this manually, when the client purchase the addon we force the auto ssl manually from whm, now we want to do this automagically with php API . though how whm handel this from backed, we need to send a command API to tell cpanel force Auto-SSL for use X, then cPanel take care for the rest. really it was surprise for us that cPanel hasn't a command in thier API to do this !!! So to resume we want to enable AUTO-SSL for users who assigned package & feature list has auto-ssl disabled .0 -
Hi @activa If all you're looking for is to modify a package featurelist value you can modify the features/packages with some combination of the following: WHM API 1 Functions - manage_features - Developer Documentation - cPanel Documentation WHM API 1 Functions - get_users_features_settings - Developer Documentation - cPanel Documentation WHM API 1 Functions - verify_user_has_feature - Developer Documentation - cPanel Documentation There's also the Start AutoSSL Check functions: WHM API 1 Functions - start_autossl_check_for_one_user - Developer Documentation - cPanel Documentation WHM API 1 Functions - start_autossl_check_for_all_users - Developer Documentation - cPanel Documentation 0 -
You can use these two api commands: whmapi1 add_override_features_for_user user=$user features=%7B%22autossl%22%3A1%7D whmapi1 start_autossl_check_for_one_user username=$user
This solve your problem.0
Please sign in to leave a comment.
Comments
6 comments