XUND
Guides

Script embed

Embed the Health Check App with a single script tag.

The quickest way to add the Health Check App to a page: place one <script> tag inside the element the app should fill.

Working examples

The frontend integration guide on GitHub covers the Health Check embed and has runnable projects.

<div id="xund-container" style="width: 100%; height: 100vh;">
  <script
    src="https://frame.health-check.class2.xund.solutions/embed.js"
    client-id="YOUR-CLIENT-ID"
    webapp-code="YOUR-WEBAPP-CODE"
    auth-code="AUTH-CODE-FROM-YOUR-SERVER"
    webapp-base-url="https://frame.health-check.class2.xund.solutions"
    app-language="en"
  ></script>
</div>

webapp-base-url is required for Health Check. Without it, the script loads the Symptom & Illness Check App instead.

How it works

The script creates an iframe inside the tag's parent element and loads the app into it, so give that element a width and a height. Attribute names are kebab-case (app-language, not appLanguage).

Attributes

AttributeRequiredDescription
client-idyesYour Client Id.
webapp-codeyesYour Web App Code.
auth-codeyesA fresh auth code from your server for each page load — see Authentication.
webapp-base-urlyeshttps://frame.health-check.class2.xund.solutions
app-languagenoThe app's language, for example en or de.

All attributes are listed in the parameter reference.

When to use the JS API instead

To read the report in your page or react when a check starts or the report is shown, use the JS API.

Last updated on

On this page