Skip to main content

Introduction

Welcome to the Autohost SDK!

Who is the SDK for?

The Autohost SDK is for developers looking to build their own Verification UI (AKA the Guest Portal), or adding the Screening AI results to your own secure Admin Dashboard.

Installation

Via CDN

To use the Autohost SDK, include it in your project by importing it from our CDN:

<script src="https://sdk.autohost.ai/dist/AutohostSDK.v1.bundle.js"></script>

After including the SDK, access it through the window object in your JavaScript code:

const AutohostSDK = window.AutohostSDK;

Please check our Release Notes page for the full list of available versions.

Initializing the Client

Initialize the client for the Autohost SDK:

const client = await AutohostSDK.init({
reservationId: RESERVATION_ID,
sandbox: true, // targets either the Develop or Production evnironments
});

To integrate SDK components into your application, use the component method with the component name, options, and target DOM element. You can provide any valid selector, such as a class, but we suggest using a unique ID.

client.component("COMPONENT_NAME", options).mount("#target");
<div id="target"></div>

SDK Versioning

Our SDK is regularly updated to introduce new features, improve functionality, and enhance security. It's important to be aware of the versioning to ensure compatibility and take advantage of the latest improvements.

CDN Versioning

When integrating the SDK via CDN, you have the option to use a major version or an incremental version, depending on your needs. The major version is available at:

The major version file follows the format AutohostSDK.vX.bundle.js, and the incremental version is AutohostSDK.vX.Y.Z.bundle.js. For example:

To use the version 1:

<script src="https://sdk.autohost.ai/dist/AutohostSDK.v1.bundle.js"></script>

And to use the incremental version:

<script src="https://sdk.autohost.ai/dist/AutohostSDK.v1.1.0.bundle.js"></script>

Please check our Release Notes page for the full list of available versions.

NPM Versioning

Comming soon.

Getting Support

If you need help or have any questions while integrating the Autohost SDK, please feel free to contact our support team or visit our documentation for more detailed guides and API references.