Hi,
I've been searching for a way to create a subdomain from my php file possibly using a cpanel api. I'm sorry icould not locate a UAPI php library or the UAPI function in the cpanel documentation. Also I tried to use the method described in the below post
https://www.codepunker.com/blog/usi...-and-email-accounts-on-a-cpanel-driven-server
using github php library
https://github.com/mgufrone/cpanel-whm
My problem when using the above library is that I'm getting access denied error. I've correctly given my cpanel username & password but still getting the error.
Could you please help me find a resolution. If the above library is outdated, could you redirect me to the latest UAPI usage example through PHP.
I'm using shared hosting.
Error as below: (example used for creating a database)
Client error: `POST https://domain.com:2083/json-api/cp...=create_database&cpanel_jsonapi_user=username` resulted in a `403 Forbidden Access denied` response: {"cpanelresult":{"apiversion":"2","error":"Access denied","data":{"reason":"Access denied","result":"0"},"type":"text"}} (truncated...)
I've been searching for a way to create a subdomain from my php file possibly using a cpanel api. I'm sorry icould not locate a UAPI php library or the UAPI function in the cpanel documentation. Also I tried to use the method described in the below post
https://www.codepunker.com/blog/usi...-and-email-accounts-on-a-cpanel-driven-server
using github php library
https://github.com/mgufrone/cpanel-whm
My problem when using the above library is that I'm getting access denied error. I've correctly given my cpanel username & password but still getting the error.
Could you please help me find a resolution. If the above library is outdated, could you redirect me to the latest UAPI usage example through PHP.
I'm using shared hosting.
Error as below: (example used for creating a database)
Client error: `POST https://domain.com:2083/json-api/cp...=create_database&cpanel_jsonapi_user=username` resulted in a `403 Forbidden Access denied` response: {"cpanelresult":{"apiversion":"2","error":"Access denied","data":{"reason":"Access denied","result":"0"},"type":"text"}} (truncated...)