Using WHM API inside plugin
Good morning,
How to use WHM API inside WHM plugin? I see the LiveAPI System but it seems only for cPanel API, not WHM API.
Note that my plugin is written in PHP. I already looked on documentation but nothing releveant.
Thanks in advance.
-
Hello, Thank you. Your documentation talk about using access hash but as far as I know, access hash is deprecated. Another method is to use API token but I think it's not a good idea to create an API token per WHM user, and I'm risking to break my module if someone delete its API token. Is there any way to log in into WHM API other than these two methods? 0 -
Those are the only two tools available for the API system to connect properly. Someone would need root access to the machine in order to delete the token, so it would not be randomly removed by an automated process. 0 -
Hello, Finally, I went by running whmapi1 binary using shell_exec PHP function to call WHM and cPanel API. Also, I've found that running whmapi1 provide me better performance than calling the API throught cURL on "127.0.0.1" (0.01 sec difference). 0
Please sign in to leave a comment.
Comments
4 comments