Skip to content

MQTT Credentials

GET
/users/id/getMqttCredentials

Retrieves a users MQTT Credentials if set, for legacy use in connecting to MQTT.

Parameters

Path Parameters

id*

user id

Typestring
Required

Responses

Request was successful
JSON
{
"clientId": "string",
"username": "string",
"password": "string"
}

Samples

cURL
curl -X GET https://api.lightbug.cloud/api/users/id/getMqttCredentials
JavaScript
fetch("https://api.lightbug.cloud/api/users/id/getMqttCredentials")
  .then(response => response.json())
  .then(data => console.log(data));
PHP
file_get_contents("https://api.lightbug.cloud/api/users/id/getMqttCredentials");
Python
import requests
response = requests.get("https://api.lightbug.cloud/api/users/id/getMqttCredentials")
print(response.json())