Skip to main content
Connect Tork to KODE OS for smart bathroom, occupancy data integration

Overview

Use this integration to connect Tork hygiene and occupancy endpoints to KODE OS. Webhook push and REST discovery keep dispenser and restroom sensor data synchronized for facility services.

Supported Capabilities

  • Discover Devices & Points
  • Collect Sensor Data
  • Receive Webhook Data

Prerequisites

  • An active account with Tork and access to their API or developer portal
  • OAuth client credentials (Client ID and Client Secret) from the Tork developer portal
  • KODE OS environment with access to Data Sources

Generate API Credentials

  1. Log in to the Tork developer portal or admin console
  2. Navigate to the API or developer settings section
  3. Create a new API application or client
  4. Note the Client ID and Client Secret — you will need these when configuring the connector in KODE OS
  5. Note the Auth URL for OAuth token exchange

Configure Webhook

This integration uses webhooks for real-time data delivery. After creating the connector in KODE OS:
  1. Copy the webhook URL provided on the connector detail page
  2. In the Tork platform, navigate to the webhook or notification settings
  3. Add a new webhook endpoint using the KODE OS URL
  4. Configure the authentication header as specified on the connector detail page
  5. Save and enable the webhook

Configure Connector in KODE OS

  1. Navigate to Data Sources in your building
  2. Click API Catalog and search for Tork
  3. Click + Add Datasource
  4. Fill in the fields below and complete the three-page setup flow

Discover Devices and Points

After configuring the connector, click Discover on the connector detail page. KODE OS will query the Tork system and return a list of available devices and their data points. Review the discovered items and select the devices you want to register in KODE OS. For more details on the discovery process, see the Discovery guide.

Devices and Points

When you discover devices from Tork, KODE OS maps them to the following device types and data points:

Dispenser

Canonical Type: sanitation

People Counter

Canonical Type: presenceDetection

What Data You Get

Point History

Time-series sensor readings including dispenser fill levels, battery status, connectivity status, visitor counts, and refill events from Tork devices

Polling Schedule

  • Point History — Default polling: 2 hours (min: 2 hours, max: 2 hours)
Tork uses webhook-based push delivery. Data arrives in real time when device state changes. The polling schedule above is for the health-check ping interval, not for data collection.
For more details on collection modes, see the Data Collection guide.

Use Cases

Once connected, this integration enables you to:
  • Receive real-time updates on dispenser refill levels, ensuring timely refills and reducing complaints about empty dispensers
  • Track the total number of people using the restroom per day for trend analysis and operational planning
  • Monitor current occupancy in restrooms, enabling more frequent cleaning for high-traffic periods
  • Trigger alerts if restroom occupancy exceeds predefined limits
  • Compare restroom usage across multiple locations to allocate resources more efficiently
  • Validate cleaning schedules against hygiene regulations based on actual restroom usage
  • Automatically trigger alarms when sensor data indicates the need for immediate attention

Troubleshooting

Verify that the API credentials are correct and have not expired. Check that the URL is reachable from the KODE OS environment. Ensure the Client ID and Client Secret match the values in the Tork developer portal.
Verify the connector credentials have sufficient permissions in the Tork system to list devices. Run a test connection first to confirm connectivity. Confirm the correct Site ID is configured in the API Building ID field.
Verify the webhook URL is correctly registered in the Tork platform. Check that the authentication header matches the value from the KODE OS connector detail page. Ensure the Tork system can reach the KODE OS webhook endpoint over the network.
Check the connector status on the Data Sources page. For webhook integrations, verify the webhook threshold (7 days) has not been exceeded without receiving data. If the status shows an error, review the error logs on the connector detail page.
Last modified on March 29, 2026