Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Creating User Based AutoSSL

Discussion in 'cPanel Developers' started by Hamit, Jun 2, 2017.

Tags:
  1. Hamit

    Hamit Member

    Joined:
    Jun 2, 2017
    Messages:
    6
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    Turkey
    cPanel Access Level:
    DataCenter Provider
    I want to implement autoSSL features for any user in our system.
    When the enduser in the system hit the "create free ssl" button, system will call the CPanel API and enable autossl for the current user.
    I couldnt find the targeted api function. I have looked (start_autossl_check_for_one_user and add_override_features_for_user) but those are not the condition.

    kind regards
     
  2. Hamit

    Hamit Member

    Joined:
    Jun 2, 2017
    Messages:
    6
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    Turkey
    cPanel Access Level:
    DataCenter Provider
    i got it thank you
     
  3. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,658
    Likes Received:
    1,425
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    Would you mind sharing the solution you decided to use in-case someone else has the same question?

    Thanks!
     
  4. Hamit

    Hamit Member

    Joined:
    Jun 2, 2017
    Messages:
    6
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    Turkey
    cPanel Access Level:
    DataCenter Provider
    Like the way below

    CPanelXMLAPI xmlap = new CPanelXMLAPI(_host,_user,_pwd);
    v2.Key = "api.version";
    v2.Value = "1";
    v3.Key = "features";
    v3.Value = "{\"autossl\":1}";

    v4.Key = "user";
    v4.Value = userName;

    string result1 = xmlap.XMLAPIQuery("add_override_features_for_user?", new List<KeyValue> { v4, v2, v3 });
     
    #4 Hamit, Jun 5, 2017
    Last edited by a moderator: Jun 5, 2017
    cPanelMichael likes this.
Loading...

Share This Page