listresellers api requires root access only
Hello,
I created an API to list the resellers, but the issue is the API token should have everything access, otherwise I have permission denied error.
This is my code:
import requests
token = 'JJM6U3BS0Z0D4HASLNDFP0S9IUCMIAQN'
listaccts = requests.get(headers={'Authorization': f'whm sysadmin:{token}'}, url='https://whm.mysite:2087/json-api/listaccts').json()['acct']
listresellers = requests.get(headers={'Authorization': f'whm sysadmin:{token}'}, url='https://whm.mysite:2087/json-api/listresellers').json()
This is the response if my token has all access, except the root privilege:
{'statusmsg': 'Permission Denied', 'status': 0}
And this is the response if I grant the root privilege:
{'reseller': ['sysadmin']}
I currently have a user called sysadmin and it has in fact the root privilege.
My question is why the listresellers requires root access, while listaccts requires only the general privileges? Does listresellers have anything to do with root access?
-
Hey there! Yes, root privileges are required to see the other resellers on the server.
0
Please sign in to leave a comment.
Comments
1 comment