Skip to main content

mqttclient.id()

Retrieve an MQTT connection’s client ID

Availability

Agent

Returns

String — The client identifier passed to the broker when the client connected

Description

This method allows you to retrieve the client ID supplied when the mqttclient object connected to a broker (ie. by using the imp API method mqttclient.connect()).

The call returns a string of between one and 255 characters in length.