In certain IoT platforms, we have certain ready-made solutions where we just need to call a certain web service and the connection is established. Internally, it may use REST APIs, but for the benefit of the user, they have come up with their own SDK where we implement.
Internally, a platform may follow either a REST call, MQTT, or Web Sockets. However, we just use an SDK where we don't implement it directly, and by using the platform's SDK, we are able to establish a connection. It is entirely platform-specific. Here, we are discussing one of the workarounds,where we use the MQTT protocol to control our devices directly without the use of any IoT platforms.