To use Webshell, you have to create an app in your Dashboard which will generate valid API Keys.
The easier way to install this sdk is to use npm:
npm install wsh
You can also clone this repo or download the latest release, to add it into your
This is a simple app using Webshell. To run this sample, you have to replace
MY_DOMAIN with valid infos from the registered app.
var wsh = ;// init webshell with authentications keyswsh;// execute webshell codevar wshcall = wsh;// set eventswshcall;wshcall;wshcall;
code attribute of
wsh.exec() is processed on our server and we retrieve all kind of data for you.
All these parameters must be strings and are optional.
After initializing your
wsh object with the
wsh.init, you can use
wsh.exec with these default parameters.
This method executes some code on webshell. The only required parameter (if you have init wsh before) is
code. This can be directly the first argument, or a key of the given object.
The object can take these parameters:
wsh.exec returns a WebshellCall object used to handle some events specifically to a call.
wsh object and the WebshellCall objects can emit several events:
When the sdk receives a view from the server.
When an execution finishes and returns a result.
When any error on webshell or sdk occurs.
Read more information about Webshell in the documentation