[M2QTT] I want to create a rest api that sends a mqtt publish
Forge component by Vasco Mendes
Application Type
Traditional Web

I'm trying to create a rest api that sends a mqtt publish. However, it's not working. i;m guessing that the reason is that i can't add a javascript component to it.  Any suggestions?

Hello Preston,

Since REST APIs are session agnostic it means the JS code won't be able to execute.

Nevertheless, you can implement a different logic, exposing a REST API that listens to requests and on the front-end module will call a MQTT publish action according to your needs.

Hope this helps.



Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.