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.

Global WHM script, accessible without an auth / api key

Discussion in 'cPanel Developers' started by rustyhex2, Apr 8, 2014.

  1. rustyhex2

    rustyhex2 Member

    Joined:
    Dec 12, 2013
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    I am planning to create global WHM script, accessible without an auth / api key. The goal is to export some common data via json/xml.
    Is this possible?
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    Could you elaborate more on how you prefer it to be accessible without authentication? Do you mean you prefer authentication to occur because a user has already signed into Web Host Manager?

    Thank you.
     
  3. rustyhex2

    rustyhex2 Member

    Joined:
    Dec 12, 2013
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Hello.

    I prefer wide-open API for public read-only data (monitoring purposes) without login / remote access key (it is sensitive information and does not required for public RO data).
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    I believe authentication of some kind is required to first obtain the data you are attempting to output. You could use one of the methods listed here:

    Authenticating API Function Calls

    Thank you.
     
  5. KostonConsulting

    KostonConsulting Well-Known Member

    Joined:
    Jun 17, 2010
    Messages:
    255
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    San Francisco, CA
    cPanel Access Level:
    Root Administrator
    Even if you are monitoring, why would you want to open an interface with root privileges that is open to the world? Wouldn't it make more sense to have some off-server system poll whatever WHM APIs you wanted to make publicly available and then make that data public? You could technically downgrade your permissions within the WHM API call but it's then likely that you wouldn't have the right data available. Maybe if you could provide more context about what you're trying to accomplish, we could provide a more accurate answer.
     
Loading...

Share This Page