MQTT
Pub/sub via MQTT within your organisation namespace, with JWT or static credentials
Last updated on
MQTT credentials give integrations pub/sub access within your organisation's topic namespace. You create credentials in Tillor under Profile menu → Developers (per organisation). Access to topics is limited by default to tillor/{env}/{orgId}/integration and its sub-topics ({env} = prod, staging or local). A static credential can get another topicPrefix, but always inside tillor/{env}/{orgId}.
For the same realtime events as webhooks and SSE, use those channels, not MQTT.
Management
| Method | Path | Description |
|---|---|---|
| POST | /api/orgs/:orgId/mqtt/credentials | Generate JWT credentials (temporary) |
| GET | /api/orgs/:orgId/mqtt/static-credentials | Retrieve static credentials |
| POST | /api/orgs/:orgId/mqtt/static-credentials | Create a static credential |
| DELETE | /api/orgs/:orgId/mqtt/static-credentials/:id | Delete a static credential |
Authentication: x-api-key, with the organisation ID in the path (same as the HTTP API). See the OpenAPI specification for the full request and response schemas.
Credentials
There are two variants:
JWT (temporary)
- Use: Short sessions, temporary access
- Expiry: 1 hour by default; configurable from 1 minute to 24 hours via
expiresInSeconds - Ideal for: Testing, temporary connections, or when you fetch tokens dynamically
- Creating: In Tillor under Profile menu → Developers, or via
POST /api/orgs/:orgId/mqtt/credentialswith optionally{ "clientId": "...", "expiresInSeconds": 3600 } - Response:
token(use as MQTT password),clientId,brokerUrl,topicPrefix,expiresAt - Username: Leave empty when connecting; JWT authentication only uses the token as password.
- Client ID: Use exactly the
clientIdfrom the response when connecting (including the environment prefix, e.g.prod-). If you choose your ownclientId, it must start withtillor-{orgId}-(e.g.tillor-org_abc123-barrier); any other value is refused.
A connection to the broker via mqtts verifies the server certificate. If you use a private CA certificate (not the standard public chain), put the PEM of that CA in your client environment.
Static credentials
- Use: Long-running integrations, always-on connections
- Form: Fixed userName, clientId and password
- Ideal for: Production integrations that stay connected continuously
- Creating: In Tillor under Profile menu → Developers, or via
POST /api/orgs/:orgId/mqtt/static-credentialswith optionally{ "name": "prod-tillor-org_abc123-mijn-integratie", "topicPrefix": "tillor/prod/org_abc123/integration" }(a customnamealways starts with{env}-tillor-{orgId}-) - Response:
userName,clientId,password(once only),topicPrefix(ACL{topicPrefix}/#), optionallybrokerUrl - Note: The password is shown once in the response and cannot be retrieved afterwards
Topic access
Topic subscriptions are strictly limited to the credential's topicPrefix. By default you can only publish and subscribe on tillor/{env}/{orgId}/integration and tillor/{env}/{orgId}/integration/#.
- Allowed topics - Only
tillor/{env}/{orgId}/integrationand sub-topics (e.g.tillor/{env}/{orgId}/integration/connector/access-point-operation) - No wildcard bypass - Even with
#or+you only get access to your organisation namespace - Per organisation - Credentials are per organisation; you have no access to topics of other organisations