Xan Posted August 12, 2021 Share Posted August 12, 2021 Hi, I have been spending quite a few hours trying to figure out how to read the current values of a server's extra config options (the ones you manage at /admin/configproductoptions.php). I have been able to read the possible config options themselves through both the undocumented eloquent models aswell as through the GetProducts internal API.. but both methods only give me the possible options themselves and not the current value of the options for the server. This information does not seem to be part of the array returned by the GetProducts API call. So tl;dr: How can I read the current value of the config options for a given server.. and what is the proper way to update these values. For the latter I have found the following documentation: "https://developers.whmcs.com/api-reference/updateclientproduct/" but I am hoping for a better option then setting a base64 serialized array. But if this is the only way it'll have to do.. Thanks in advance for anyone that can give me any information :) 0 Quote Link to comment Share on other sites More sharing options...
Xan Posted August 13, 2021 Author Share Posted August 13, 2021 I managed to read the current server product option settings by using the GetClientsProducts API endpoint. But I am still stuck trying to update one of the values: I am trying something like: $results = localApi('UpdateClientProduct', [ 'serviceid' => $service->id, 'configoptions' => base64_encode(serialize([ [$optionId => $value] ])) ]); And although the API returns 'success' (which it always seems to do, no matter what information I post) the option does not get updated. 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.