Calling hook from WHM API 1 for account create
I have a script registered to the account create API. I also have a cURL operation that is using a JSON-encoded URL to run the account created command thru the API. This part is working in that it does create the CPanel account properly. What is the correct way pass a variable to the hooked script I have registered? This is the URL that I have:
[PHP]$query = "https://" . $server_creds['whmserver"> . ":2087/json-api/createacct?api.version=1&username=$username&domain=$domain&plan=$plan&password=$password&contactemail=$contactemail&owner=" . $server_creds['reseller"> . "&@hook_args=$username"a=$quota";[/PHP]
$server_creds is an array which includes the hash code and everything else need to authorize the API call. The other parameters are passed using jQuery AJAX but could also be just a form POST.
-
Hello, You could trap the custom variable in your custom script, store it to file, and then retrieve the variable from that file. However, could you elaborate a little more on the purpose of this configuration so we can better understand what you are attempting to do? Thank you. 0
Please sign in to leave a comment.
Comments
1 comment