# controller\_mqtt\_transport

Source: https://zotonic.com/docs/1892/controller_mqtt_transport

URI: https://zotonic.com/id/1892

Language: en



Controller for transport of MQTT data between the browser (client) and server.

This controller accepts Websocket connections and out-of-band HTTP POSTs.

The HTTP POSTs must have a valid ticket. See <a href="/id/doc_model_model_mqtt_ticket" class="doc-reference doc-reference-model"><code>model#mqtt_ticket</code></a> on how to obtain such a ticket and more information about tickets.

The Websocket connection is a normal MQTT transport over Websocket.

For the authentication the Websocket accepts two methods:

- Cookie authentication with `z.auth` cookie, see <a href="/id/doc_controller_controller_authentication" class="doc-reference doc-reference-controller"><code>controller#controller_authentication</code></a>.
- Username and password in the MQTT connect

License: 

Attribution: 

Related resources: https://zotonic.com/api/agent/related/1892?language=en


## API access

- [API help](<https://zotonic.com/api-help>)
- [OpenAPI specification](<https://zotonic.com/openapi.json>)
- [This resource as JSON](<https://zotonic.com/api/agent/resource/1892?language=en>)
