[WHM API 1] start_autossl_check_for_one_user does not seem to work

Delmore

Member
Nov 24, 2021
15
2
3
France
cPanel Access Level
Root Administrator
Hello guys,

I have a server running on AlmaLinux v8.5.0 & using WHM v100.0.4.
From a PHP application using the WHM/cPanel UAPI, I am able to create new cPanel accounts and deploy new websites.

When my website is ready and deployed, I can acces it via HTTP (using the IP reserved for this cPanel). But if when I try to acces it via HTTPS, it failed because the self signed certificate is not checked and validated.
As I understand, i need to start an autoSSL check for this cPanel account.

To do so, I call start_autossl_check_for_one_user using the username of the cPanel account and authenticated as root via BasicAuth.
However, this call does not seem to work. Even after 5 minutes, the certificate is not checked nor validated. I'm 100% sure that the call is successful cause I can retrieve the PID of what is supposed to be the running autoSSL check task.
Also, it does not generate SSL failure logs and stuff as if the API call never happened.

I do already try calling add_override_features_for_user beforehand to make sure that autoSSL feature is enable for this user (which does not make sense because I do the autoSSL check call as root).

Obviously, if I run autoSSL check using cPanel backoffice, it runs & validates the certificate as expected.

Am I missunderstanding something or is the API call broken ?

EDIT: Ok, start_autossl_check_for_one_user does work on cPanel I created yesterday. So I assume there is some kind of a delay between the moment that the cPanel account is created and the moment where you can do a start_autossl_check_for_one_user which will actually work. Isn't it ?

Thanks
 
Last edited:
  • Like
Reactions: cPanelAnthony

cPanelAnthony

Administrator
Staff member
Oct 18, 2021
1,041
112
118
Houston, TX
cPanel Access Level
Root Administrator
Hello! There shouldn't be a specific delay that I am aware of. To test, I created a cPanel account and ran the "start_autoss_check_for_one_user" API call less than two minutes later. It seems to have successfully run AutoSSL on the user.

Do you see an AutoSSL log from the time you ran the API call?

Where are AutoSSL logs stored
 

Delmore

Member
Nov 24, 2021
15
2
3
France
cPanel Access Level
Root Administrator
Hello! There shouldn't be a specific delay that I am aware of. To test, I created a cPanel account and ran the "start_autoss_check_for_one_user" API call less than two minutes later. It seems to have successfully run AutoSSL on the user.

Do you see an AutoSSL log from the time you ran the API call?

Where are AutoSSL logs stored
It seems to work from now on. We tested with 3 new domains (associated w/ cPanel accounts). SSL was enabled thanks to start_autoss_check_for_one_user API call.
We probably had an issue for the specific domain name we used in my first message ...

I will continue this discussion if the issue happen again and from there, I might have some log to show you.

Thanks
 
  • Like
Reactions: cPanelAnthony