Can‘t use "list_pops_for" in WHM API, Permission denied

winoct

Registered
Mar 8, 2021
3
0
1
algeria
cPanel Access Level
Root Administrator
Hello,
Am using WHM API to get all email accounts in a cPanel account, when i use the function list_pops_for i get the error:
{"metadata":{"result":0,"command":"list_pops_for","version":1,"reason":"Permission denied: You do not have the required privileges to run “list_pops_for”."}}
I use WHM API Token, i don‘t want tu give full root access to API Token, so how can i execute this function without full root access?
Here are the persmission i gave ro my API Token :
reate-user-session
list-pkgs
manage-dns-records
list-accts
show-bandwidth
create-acct
suspend-acct
passwd
viewglobalpackages
 
Last edited by a moderator:

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
7,440
1,004
313
cPanel Access Level
Root Administrator
Hey there! I've been doing some testing with this and found that specific call does need root privileges as it does not have any associated ACL for a token. If you'd like to see that adjusted in the future I'd recommend submitting a feature request using the link in my signature below, but for now I don't have any other workaround than using the root user.
 

winoct

Registered
Mar 8, 2021
3
0
1
algeria
cPanel Access Level
Root Administrator
I‘ve submitted a feature request.
I hope there will be a way to modify something in the server to make it possible even for the function get_mailbox_status