Skip to main content

Customer WebApp

How does it work?#

In your customers' clientarea in the whmcs there is an iframe element that its src is set to the current url with the additional parameter "panel=2". like this:

https://your.whmcs/clientarea.php?action=productdetails&id=2000&panel=2

whenever a customer opens this URL, the VmBox whmcs Module sends a request to VmBox to create a WebSocket token to connect the customer to VmBox through the WebApp. the result is a WebSocket server address. Then the module redirects the customer to a URL like this:

https://yourhosting.com/customerPanel/?wsAddr=wss://vmbox.yourhosting.com:443/[wsToken]

this URL consists of two parts,

  • "https://yourhosting.com/customerPanel" is the Customer WebApp address that can be hosted on your whmcs or your hosting. this address can be changed by editing the Config.php file in the whmcs module folder. There is a ready-to-use WebApp located at "https://vm-box.com/customerPanel". you can use this Address but if you want to edit the WebApp you should use your own version.
  • "?wsAddr=wss://vmbox.yourhosting.com:443/[wsToken]", this parameter is the WebSocket address which the WebApp should use to connect to your VmBox. you can use any Customer WebApps by adding this param to the end of the URL.