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.

API Permissions for child websites?

Discussion in 'cPanel Developers' started by Clarkeez, Feb 17, 2012.

  1. Clarkeez

    Clarkeez Registered

    Joined:
    Feb 17, 2012
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Reseller Owner
    Hey

    I have a reseller package / hosting from UK Web Solutions Direct and I'm having a problem with using the API.

    I have a PHP script that automatically creates a email account on cpanel via the API.
    This works fine if you enter the cpanel user and pass of the domain you want to add the email account too.

    What I want to do is enter the cpanel user and pass of my reseller main account and then add email accounts on different domains without changing the cpanel user and pass.

    The thing that confuses me is that using the user and pass of my reseller main account within cpanel allows me full access to different domains control panels, so why is this different for the API?

    This is the script (if taken the user/pass/domain out for obv reasons):
    /http://pastebin.com/HAdxYUBL
    Any help or pointers would be great.

    Regards,
    Matt Clarke
     
  2. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    Reseller override works in the APIs as well.

    For example, in line 53, you are authenticating into the API using your reseller credentials.

    However, when we get to line 60 where we need to know which cPanel account you want to add that email account to, you are specifying to add it to your reseller account's cPanel account. You need to actually specify which cPanel account that email account will be created in on line 60 just like when you do the reseller override thing, you need to select which cPanel account you want to control.

    You're on the right track, just when it comes to the API, it just needs to have more things explicitly stated.
     
  3. Clarkeez

    Clarkeez Registered

    Joined:
    Feb 17, 2012
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Reseller Owner
    Ahh I see, thanks for making sense of it for me... I'll let you know how I get on
     
Loading...

Share This Page