Skip to main content

API2 SSL listcrts get expiration date

Comments

6 comments

  • cPanelMichael
    Hello, Is there any reason you prefer to use cPanel API 2 over UAPI? You can use the following UAPI function for this purpose: UAPI Functions - SSL::list_certs - Software Development Kit - cPanel Documentation The "not_after" value in the output displays the certificate's expiration time. Thank you.
    0
  • stapuff106
    I appreciate the response back. API1 and API2 are pretty simple to use with php. I have looked at UAPI briefly, but have not found a "How to Setup & Use cPanel UAPI for Dummies" yet.
    0
  • cPanelMichael
    Hello, A general guide on using UAPI is available at: Guide to UAPI - Software Development Kit - cPanel Documentation Additionally, here's a thread you may find helpful when using UAPI functions with PHP: UAPI PHP Class Let us know if this helps. Thank you.
    0
  • stapuff106
    I appreciate your response. Looked over your initial response over the weekend and found the class you suggested in your latest response. Got it up and running last night.... so I appreciate you taking the time out to respond. Thanks, Puff
    0
  • stapuff106
    cPanelMichael - I had 1 question.... when I run the uapi SSL list_certs it return 6 data arrays in a var_dump response. I am using the AutoSSL in WHM so it is creating 1 SSL for domain, mail, etc. I see 1 date in WHM, but 6 different dates when I convert the not_after's. Why is it listing 6, why are the dates different, and only 1 not_after comes within a day of matching what is shown in WHM. Ok sorry... had more than 1 question. Puff
    0
  • cPanelMichael
    Why is it listing 6, why are the dates different, and only 1 not_after comes within a day of matching what is shown in WHM.

    This indicates the certificates were issued at different times. For instance, this would happen if a subdomain or addon domain name was added to the cPanel account at later date than when the account was setup. Thank you.
    0

Please sign in to leave a comment.