...
Select Page

Kiosk Management Software for Developers

  1. Home
  2. Kiosk Management Software for Developers

Turn any website into a kiosk app.

Connecting your website to kiosk functionality has never been easier. With the Zamok Kiosk API, it takes just minutes. No drivers. No native dependencies. Just JavaScript.

How does it work?

Every Zamok kiosk ships with a secured and enhanced web browser called WebView.  Built on Chromium, the engine that powers Google Chrome, our browser is capable of running most modern websites out of the box with minimal configuration. It was designed for public use and is ideal for airports, libraries, lobbies, waiting rooms, and other customer service areas.

In addition to enhanced security features, our browser also ships with the Zamok Kiosk API – making integration with kiosk peripheral devices easy.

What is the Zamok Kiosk API?

You can think of it as an extension of the standard Web API. Where web browsers provide APIs for things like cameras, microphones, and printers, Zamok extends that model to kiosk hardware and services including credit/tap/EMV payment terminals, cash recyclers, signature pads, document scanners, and more. The Kiosk API makes integrating with kiosk hardware simple.

What is Zamok?

Standard web browsers like Chrome, Edge, and Safari are designed for personal use on personal computers; not kiosks.  Even Incognito Mode is unsuitable for public use as it can persist cookies and other user data in between sessions. Zamok is the solution for your kiosk browsers.

Transform your website into a powerful, secure kiosk app in minutes. Get started today by following our Quick Start guide below…

Quick Start

Integrate your website with Zamok in 5 minutes

Follow these simple steps to start communicating with Zamok kiosk software from your web application.

Prerequisites

📝 Must have a Zamok kiosk and a Zamok account.

📝 Must have your kiosk configured with a WebView Homepage template

Setup Steps

  • Add your domain to the list of allowed domains in the Zamok Dashboard (Click here to go to Settings)
  • Include zamok.js in your web application (Click here to download)
  • Initialize the client and wait for .ready()
  • Start using the API methods to interact with the kiosk
Quick Start

Returns the current state of the kiosk application.

 // This script assumes you have zamok.js included in your project. const kioskAPI = window.zamok.api("https://www.mywebsite.com"); // TODO - Replace with your website's domain // Wait for API ready kioskAPI.ready().then(() => { 
    // You can now do stuff on the kiosk. // For example, read from kiosk state const latestState = zamok.getState();
    console.log("Latest state from the kiosk:", latestState);

    // Or, dispatch a Zamok Action. // In this case, lock the kiosk screen with a message kioskAPI.dispatch({
      type: "OUT_OF_SERVICE",
      payload: {
            reason: "maintenance",
            message: "Hello, world! This kiosk is unavailable.",
      }
    });

    // Respond to specific events/actions on the kiosk // In this case, log when the next kiosk user session starts kioskAPI.waitForAction("SESSION_START").then((zamokUpdate) => {
    const { action, state } = zamokUpdate;
    // When an action is fired, we also provide the latest state console.log("A session has started.", action, state.session);
  });
}).catch((e) => { // Error handling console.error("Unable to initialize kiosk client", e); });

Core Concepts

Understanding these key concepts will help you build robust integrations with Zamok.

Actions

    • Actions are messages going to or coming from the kiosk.
    • Actions are triggered automatically when certain events happen on the kiosk, such as when a new user session starts, a phone call ends, or a user scans their ID. You can listen to specific actions with the waitForAction() function.
    • Actions can also be triggered manually to invoke kiosk functionality with the dispatch() function.

State

    • Most of the kioskʼs internal application state can be accessed through the Zamok Kiosk API.  We reserve some state properties, such as auth tokens, for security purposes.
    • You can request the latest state at any time with the getState()function.
    • You can also subscribe to every state update with the data$ stream.

Module Documentation

For a full list of all available actions and state properties, check out the module docs here: https://kiosk-api-docs.web.app/modules.html

Please note: Not all modules may be available on your kiosk.  Please check with your Account Representative for a list of all available modules.

 

API Reference

Complete reference for all Zamok API methods and their usage.

zamok.getState()

Returns: Current state of the kiosk application.

const state = zamok.getState();
console.log(state.session);

Returns: Object containing the complete kiosk state

zamok.dispatch(action)

Dispatches an action to the kiosk’s Redux store.

zamok.dispatch({
  type: 'START_VOIP_CALL',
  payload: {
    phoneNo: '18005551234'
  }
});

Parameters:

  • action (Object): Redux action with type and optional payload
zamok.waitForAction(actionType, timeout)

Waits for a specific action to be dispatched, useful for synchronizing with kiosk events.

try {
  const action = await zamok.waitForAction('CARD_INSERTED', 5000);
  console.log('Card detected:', action.payload);
} catch (error) {
  console.log('Timeout waiting for card');
}

Parameters:

  • actionType (String): The action type to wait for
  • timeout (Number): Timeout in milliseconds (optional)
zamok.data$ (Advanced – Requires RXJS library)

Observable stream of state changes. Subscribe to get real-time updates when the kiosk state changes.

// Subscribe to state changes const subscription = zamok.data$.subscribe(state => {
  console.log('State updated:', state);
});

// Unsubscribe when done subscription.unsubscribe();

Returns: RxJS Observable that emits state changes

Best Practices

Always Wait for .ready()

  • Never call API methods before zamok.ready() resolves
  • Remember: .ready() means the API Client is initialized, is does not mean that all modules and state properties are loaded.
  • Handle initialization errors gracefully

Use needProps if requesting state on kiosk
load

  • Ensures your state property is available before the getState() promise is resolved.
  • This ensures the necessary data is available before your app starts
  • Prevents race conditions with state loading

Add Timeouts to waitForAction

  • Always provide a reasonable timeout value
  • Handle timeout errors to prevent hanging operations
  • Consider user experience if actions don’t occur

Staying Updated

Documentation Updates

This documentation is updated regularly as new features are added to the Zamok API. Bookmark this page to stay current with the latest capabilities.

Getting Help

  • Technical Support: Email support@advancedkiosks.com
  • Feature Requests: Contact your account manager
  • Bug Reports: Include error messages and reproduction steps

API Versioning

The Zamok API follows semantic versioning. Breaking changes are rare and will be communicated well in advance with migration guides.

Sample Project

🚀 Quick Start Project

View our demo page at https://kiosk-script.web.app/ to get an understanding of how the Kiosk API works. And don’t forget to add this domain to your “Allowed API Origins” in Dashboard Settings!

FROM OUR BLOG 

Accessibility Toolbar

Speak with a Specialist