Using Appmixer SDK
Last updated
Last updated
The Appmixer JavaScript SDK allows you to embed any of the UI widgets of Appmixer into your own web products. You can also take advantage of the SDK methods to communicate with the Appmixer engine REST API.
Start with opening the Appmixer SDK demo in your browser:
Notice that this won't work yet since we haven't configured the basic required variables. First, we need to edit the demo HTML file to add the base URL of our Appmixer engine REST API ( and our user credentials. Open the demo.html file in your editor and find the following section:
Replace <your-base-url>
with https://api.[acme].appmixer.cloud
and <your-username>
and <your-password>
with the user credentials. You can use the credentials that you received after your hosted environment was created. Or you can create a new user at http://my.[acme].appmixer.cloud
. Now you can open the demo.html file in your browser. You should see something like this:
The demo shows a plain HTML page that embeds the Appmixer UI widgets via the Appmixer JS SDK. Try to switch to different widgets using the select control at the top:
Study the source code of the demo.html file to understand how the Appmixer SDK can be used to embed Appmixer UI into your own page. As you can see, we start by authenticating the user:
Then we initialize the Appmixer UI widgets passing a reference to a <div> container element they will render in:
Once our widgets are initialized, we can just call open() and close() methods to render the widgets inside their container or close them:
And react on events the UI widgets provide. For example, if the user clicks a flow inside the flow manager, the flow manager widget triggers the "flow:open"
event which we can react on to open the designer for that flow:
To revoke the authenticated user access, unset the access token:
To learn more about the Appmixer JavaScript SDK, please visit the Appmixer SDK section.