Tillor
Ontwikkelaars

MQTT

Pub/sub via MQTT binnen je organisatie-namespace, met JWT of statische credentials

MQTT-credentials geven integraties pub/sub-toegang binnen de topic-namespace van je organisatie. Credentials maak je aan in Tillor onder Account > Ontwikkelaars (per organisatie). Toegang tot topics is strikt beperkt tot tillor/{env}/{orgId}/integration en sub-topics ({env} = prod, staging of local).

Voor dezelfde realtime events als webhooks en SSE gebruik je die kanalen, niet MQTT.

Beheer

MethodPadBeschrijving
POST/api/orgs/:orgId/mqtt/credentialsJWT-credentials genereren (tijdelijk)
GET/api/orgs/:orgId/mqtt/static-credentialsStatische credentials ophalen
POST/api/orgs/:orgId/mqtt/static-credentialsStatische credential aanmaken
DELETE/api/orgs/:orgId/mqtt/static-credentials/:idStatische credential verwijderen

Authenticatie: x-api-key en X-Tillor-Org-Id (zelfde als HTTP API). Zie de OpenAPI-specificatie voor volledige request- en response-schema's.

Credentials

Er zijn twee varianten:

JWT (tijdelijk)

  • Gebruik: Korte sessies, tijdelijke toegang
  • Verloop: Standaard 1 uur; configureerbaar van 1 minuut tot 24 uur via expiresInSeconds
  • Ideaal voor: Testen, tijdelijke verbindingen, of wanneer je tokens dynamisch ophaalt
  • Aanmaken: In Tillor onder Account > Ontwikkelaars, of via POST /api/orgs/:orgId/mqtt/credentials met optioneel { "clientId": "...", "expiresInSeconds": 3600 }
  • Response: token (gebruik als MQTT-wachtwoord), clientId, brokerUrl, topicPrefix, expiresAt
  • Gebruikersnaam: Laat leeg bij verbinden; JWT-auth gebruikt alleen het token als wachtwoord.
  • Client-ID: Gebruik exact de clientId uit de response bij verbinden (inclusief het omgevingsvoorvoegsel, bijv. prod-).

Een verbinding naar de broker via mqtts controleert het servercertificaat. Gebruik je een privaat CA-certificaat (niet de standaard openbare keten), zet dan de PEM van die CA in je client-omgeving (of in je connector-container via TBMQ_MQTT_CA_PATH). Zie Connector voor de connector-specifieke variabelen.

Statische credentials

  • Gebruik: Langlopende integraties, altijd-on verbindingen
  • Vorm: Vaste userName, clientId en password
  • Ideaal voor: Productie-integraties die continu verbonden blijven
  • Aanmaken: In Tillor onder Account > Ontwikkelaars, of via POST /api/orgs/:orgId/mqtt/static-credentials met optioneel { "name": "mijn-integratie" }
  • Response: userName, clientId, password (eenmalig), topicPrefix, optioneel brokerUrl
  • Let op: Het wachtwoord wordt eenmalig in de response getoond en kan daarna niet meer worden opgehaald

Topic-toegang

Topic-subscripties zijn strikt beperkt. Je kunt alleen publiceren en subscriben op tillor/{env}/{orgId}/integration en tillor/{env}/{orgId}/integration/#. Pogingen om andere topics te benaderen worden geweigerd.

  • Toegestane topics - Alleen tillor/{env}/{orgId}/integration en sub-topics (bijv. tillor/{env}/{orgId}/integration/connector/barrier-operation)
  • Geen wildcard-bypass - Zelfs met # of + krijg je alleen toegang tot je organisatie-namespace
  • Per organisatie - Credentials zijn per organisatie; je hebt geen toegang tot topics van andere organisaties

Gerelateerd

  • OpenAPI - Volledige API-specificatie
  • HTTP API - REST API en API-sleutels
  • Webhooks - Zelfde events via HTTP POST
  • SSE - Stream events via Server-Sent Events

On this page