Authentication to 3rd party plugins through scripting

Syneic

Member
Mar 17, 2014
11
2
3
cPanel Access Level
DataCenter Provider
I've made a plugin which we need access to through an external system, today we use php for this and send an request containing access hash to authenticate.
After version 64 this type of authentication is deprecated, so I tried to use the new api token system instead but i get the following error:

X-Error-Message: Token authentication is restricted to WHMAPI calls only

Is there a way to use token for running 3rd party plugin scripts, or do I need to go back to good old fashion http-header authentication with password ?

Having a way to run this without using authentication that gives access to whole system would be nice, so if I can put a symlink to my script within available directory for whmapi, that would be an acceptable compromise for me.

Thanks.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,268
463
X-Error-Message: Token authentication is restricted to WHMAPI calls only
Hello,

API tokens are only usable with the following features at this time:

WHM API functions
DNS Clusters
Configuration Clusters

It's likely your plugin is using cPanel API 2 or UAPI functions, leading to the error message you noticed. The following document lists the additional API authentication options available to you:

Guide to API Authentication - Software Development Kit - cPanel Documentation

Thank you.
 

cPanelKenneth

cPanel Development
Staff member
Apr 7, 2006
4,607
80
458
cPanel Access Level
Root Administrator