How it works
The Humain device API uses per-device bearer tokens. Each physical device, website widget, or VoIP adapter gets its own credential. This lets you revoke a single device without affecting others, monitor usage per device, and apply rate limits at the credential level.Browser-side integrations — a website widget, a single-page app, anything running in a
visitor’s browser — should not embed a device credential in client-side code. Use the
Public Gateway instead, which lets a browser open sessions without
ever holding this token.
Token format
A valid token always matches
/^hk_(live|test)_[A-Za-z0-9\-_]{43}$/. Both prefixes work against
the same https://api.humain.ai host — there is no separate sandbox URL. The prefix alone
determines whether the session runs live or in sandbox mode.
Issuing credentials
Credentials are managed in the admin panel under Kiosk → Credentials.1
Open the admin panel
Navigate to app.humain.ai and select your workspace.
2
Select a kiosk
Open the kiosk you want to issue a credential for. One kiosk can have multiple active
credentials (e.g. one per device in a fleet).
3
Issue a new credential
Click Issue new credential, give it a descriptive label (e.g.
lobby-terminal-01),
choose Live or Sandbox, and confirm.4
Copy the token
The raw token is displayed once. Copy it now — you cannot retrieve it later.
Using the token in code
Rotating credentials
To rotate a credential (e.g. after a suspected leak):- Issue a new credential from the admin panel.
- Deploy the new token to your device.
- Revoke the old credential — existing open sessions that used it will be terminated.
Revocation is immediate. The old token stops working as soon as you revoke it, regardless of
any cached sessions on the device.