Hi,
The documentation for the WHM api_token_update is misleading.
The documentation give the following example to assign multiple ACL to a single Token :
This is incorrect, the first acl= is not needed, as you can see if I try to run the following command :
The correct syntax (so without acl=) is :
EDIT: The same bug applies to the IP whitelisting.
Please update the documentation. The same syntax apply using the Curl API.
And provide a real example too, the CURL/CLI example is a lazy one...
The documentation for the WHM api_token_update is misleading.
The documentation give the following example to assign multiple ACL to a single Token :
Code:
Assign multiple privilges.
acl=acl-0=create-acct acl-1=list-accts acl-2=kill-acct
Code:
[root@cheeseburger ~]# whmapi1 api_token_create token_name=cp-bug acl=acl-0=create-acct acl-1=list-accts acl-2=kill-acct
---
data: {}
metadata:
command: api_token_create
reason: "The system failed to create the API token: Invalid or unauthorized ACL specified: acl-0=create-acct"
result: 0
version: 1
Code:
[root@cheeseburger ~]# whmapi1 api_token_create token_name=cp-bug acl-1=basic-whm-functions acl-2=create-acct
---
data:
acls:
- basic-whm-functions
- create-acct
create_time: '1685542950'
expires_at: ~
name: cp-bug
token: BR1G00DLUCKTRYINGTH1ST0K3NZK61Z8
metadata:
command: api_token_create
reason: OK
result: 1
version: 1
Please update the documentation. The same syntax apply using the Curl API.
And provide a real example too, the CURL/CLI example is a lazy one...