Skip to main content

Overview

Seam provides a universal API to connect and control many brands of access control systems. This guide provides a rapid introduction to connecting and controlling your Hotek access control system using the Seam API. Hotek systems communicate over TCP via a Seam Bridge installed on the property network. To learn more about other access control systems supported by Seam, head over to our integration page.

1 — Install Seam SDK

Seam provides client libraries for many languages, such as JavaScript, Python, Ruby, PHP, and others, as well as a Postman collection and OpenAPI spec.
npm i seam
Once installed, sign up for Seam to get your API key, and export it as an environment variable:
export SEAM_API_KEY=seam_test2ZTo_0mEYQW2TvNDCxG5Atpj85Ffw
This guide uses a Sandbox Workspace. Only virtual devices can be connected. If you need to connect a real Hotek system, use a non-sandbox workspace and API key.

To control your Hotek system via the Seam API, you must first authorize your Seam workspace against your Hotek installation. To do so, Seam provides Connect Webviews: pre-built UX flows that walk you through authorizing your application to control your Hotek system.

Request a Connect Webview

import { Seam } from "seam";

const seam = new Seam();

const connectWebview = await seam.connectWebviews.create({
  accepted_providers: ["hotek"],
});

console.log(connectWebview.login_successful); // false

// Send the webview URL to your user
console.log(connectWebview.url);

Authorize Your Workspace

Navigate to the URL returned by the Webview object. Since you are using a sandbox workspace, complete the login flow by entering the Hotek sandbox test credentials:
  1. Bridge connection — the pairing token is prefilled in sandbox mode
  2. Hotek Dashboard Credentials:
    • Site Name: Any string (e.g., “My Hotek Site”)
    • TCP Port: Any port number
    • Hotek SMART Server IP Address: prefilled
Confirm the Connect Webview was successful by querying its status:
const updatedWebview = await seam.connectWebviews.get(
  connectWebview.connect_webview_id
);

console.log(updatedWebview.login_successful); // true

3 — Retrieve the ACS System

After the Hotek system is linked with Seam, you can retrieve the ACS system. This represents the connected Hotek SMART Server installation.
const systems = await seam.acs.systems.list();

const hotekSystem = systems[0];

console.log(hotekSystem);
/*
{
  acs_system_id: '...',
  name: 'My Hotek Site',
  external_type: 'hotek_site',
  connected_account_ids: ['...'],
  ...
}
*/

4 — List Entrances

Entrances represent the doors managed by the Hotek system. In the sandbox, this includes guest rooms (101-104, 201-204).
const entrances = await seam.acs.entrances.list({
  acs_system_id: hotekSystem.acs_system_id,
});

console.log(entrances);
/*
[
  {
    acs_entrance_id: '...',
    display_name: 'Room 101',
    hotek_metadata: {
      room_number: '101',
      door_type: 'guest'
    },
    ...
  },
  ...
]
*/

5 — Create a User and Issue a Credential

To grant access to a guest, create an ACS user and then issue a credential (key card) for the entrances they should access.

Create an ACS User

const user = await seam.acs.users.create({
  acs_system_id: hotekSystem.acs_system_id,
  full_name: "Jane Guest",
});

console.log(user.acs_user_id);

Create a Credential for the User

const credential = await seam.acs.credentials.create({
  acs_user_id: user.acs_user_id,
  access_method: "card",
  allowed_acs_entrance_ids: [
    entrances.find((e) => e.display_name === "Room 101").acs_entrance_id,
  ],
});

console.log(credential);
/*
{
  acs_credential_id: '...',
  access_method: 'card',
  ...
}
*/

Next Steps

Now that you’ve completed this guide, you can try connecting a real Hotek system. To do so, make sure to switch to a non-sandbox workspace and API key, and ensure you have a Seam Bridge installed on the property network. In addition, if you’d like to explore other aspects of Seam, here is a list of helpful resources: If you have any questions or want to report an issue, email us at support@seam.co.