Skip to Content

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

MethodPathDescription
POST/api/orgs/:orgId/mqtt/credentialsGenerate JWT credentials (temporary)
GET/api/orgs/:orgId/mqtt/static-credentialsRetrieve static credentials
POST/api/orgs/:orgId/mqtt/static-credentialsCreate a static credential
DELETE/api/orgs/:orgId/mqtt/static-credentials/:idDelete 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/credentials with 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 clientId from the response when connecting (including the environment prefix, e.g. prod-). If you choose your own clientId, it must start with tillor-{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-credentials with optionally { "name": "prod-tillor-org_abc123-mijn-integratie", "topicPrefix": "tillor/prod/org_abc123/integration" } (a custom name always starts with {env}-tillor-{orgId}-)
  • Response: userName, clientId, password (once only), topicPrefix (ACL {topicPrefix}/#), optionally brokerUrl
  • 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}/integration and 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

Related

  • OpenAPI - Full API specification
  • HTTP API - REST API and API keys
  • Webhooks - Same events via HTTP POST
  • SSE - Stream events via Server-Sent Events
Was this page helpful?

On this page