Main Content

MQTT API

Use the MQTT API to update ThingSpeak™ channels

The ThingSpeak IoT platform enables clients to update and receive updates from channel feeds via the ThingSpeak MQTT broker. MQTT is a publish/subscribe communication protocol that uses TCP/IP sockets or WebSockets. MQTT over WebSockets can be secured with SSL. A client device connects to the MQTT broker and can publish to a channel or subscribe to updates from that channel.

To get started with the MQTT API, see: MQTT Basics. For client configuration information for your specific library, see MQTT library configuration.

Publish

Publish to a Channel FeedPublish message to update multiple channel fields simultaneously with MQTT
Publish to a Channel Field FeedPublish message to update single channel field with MQTT

Subscribe

Subscribe to a Channel FeedSubscribe to updates from channel feed with MQTT
Subscribe to a Channel Field FeedSubscribe to channel updates from specific field of channel with MQTT

Topics

Troubleshooting

Troubleshoot MQTT Publish

Get help to resolve common mistakes when using MQTT publish.

Troubleshoot MQTT Subscribe

Common mistakes and problem resolution for subscribing to ThingSpeak.