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!

API Tokens and WHM Function listresellers / resellerstats

Discussion in 'cPanel Developers' started by bellwood, Apr 1, 2019.

Tags:
  1. bellwood

    bellwood Active Member PartnerNOC

    Joined:
    Sep 25, 2012
    Messages:
    32
    Likes Received:
    5
    Trophy Points:
    8
    Location:
    New York
    cPanel Access Level:
    DataCenter Provider
    When generating API tokens, I am looking for the privileges specific to the `listresellers` and `resellerstats` functions.

    The documentation pages do not list the required token privileges to use these.

    Thank you.
     
  2. cPanelMichael

    cPanelMichael Technical Support Community Manager Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    47,555
    Likes Received:
    2,182
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello @bellwood,

    Both of those WHM API 1 functions require the All Features (all) privilege.

    Thank you.
     
  3. bellwood

    bellwood Active Member PartnerNOC

    Joined:
    Sep 25, 2012
    Messages:
    32
    Likes Received:
    5
    Trophy Points:
    8
    Location:
    New York
    cPanel Access Level:
    DataCenter Provider
    So another case where a 'god token' is needed to simply list something?

    Any chance this can be discussed internally to see if there is a chance to scope this down to a resellers group or as general permissions - using a 'god token' to simply list the resellers on a box and their stats seems careless.

    Also is there a reference/document for what token privileges are required for all the API methods?

    The ACL doc that's out there lists some but not all:
    Guide to WHM Plugins - ACL Reference Chart - Developer Documentation - cPanel Documentation

    Thanks, I look forward to your feedback.
     
  4. cPanelMichael

    cPanelMichael Technical Support Community Manager Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    47,555
    Likes Received:
    2,182
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello @bellwood,

    As it stands, this is by-design because it's not possible to view a list of resellers or view reseller usage statistics without root access to the system. The ability to have resellers manage/view other resellers is open as a feature request on the link below if you'd like to vote/add feedback:

    Add support for sub-resellers

    As far as the reference chart, the link you provided is currently the best resource available and complements the document below:

    Edit Reseller Nameservers and Privileges - Version 78 Documentation - cPanel Documentation

    Is there a specific privilege that's not listed that you'd like to see added?

    Thank you.
     
  5. bellwood

    bellwood Active Member PartnerNOC

    Joined:
    Sep 25, 2012
    Messages:
    32
    Likes Received:
    5
    Trophy Points:
    8
    Location:
    New York
    cPanel Access Level:
    DataCenter Provider
    listresellers and resellerstats aren't in there.

    Understood from your standpoint on the privileges required however it would be nice if some additional granularity was available but perhaps that will come in time.

    From a deny then allow mentality it would be fantastic if the API token interface simply offered the ability to give read and/or write privileges to any of the methods and in some cases did containerize certain sections like DNS, etc.
     
  6. cPanelMichael

    cPanelMichael Technical Support Community Manager Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    47,555
    Likes Received:
    2,182
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello @bellwood,

    This would make for a good feature request. Feel free to open the request when you have the time and post the link to it here.

    Thank you.
     
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice