How to config mqtt by "POST /flows"(remotely way) with username and passwd

I'm used "POST /flows" remotely api is effect,but in mqtt-broker-json can't set password and username ,I do not know the key in json. please tell me .

nodered-version:v2.1.6
ex "type": "mqtt-broker",
....
{
"id": "cb7119a711fda880",
"type": "mqtt-broker",
"name": "test-dasboard-mqtt",
"broker": "x.x.x.x",
"port": "8001",
"clientid": "",
"autoConnect": true,
"usetls": false,
"protocolVersion": "4",
"keepalive": "60",
"cleansession": true,
"birthTopic": "",
"birthQos": "0",
"birthPayload": "",
"birthMsg": {},
"closeTopic": "",
"closeQos": "0",
"closePayload": "",
"closeMsg": {},
"willTopic": "",
"willQos": "0",
"willPayload": "",
"willMsg": {},
"sessionExpiry": "",
},
....

Add a new broker, enter username and password, don't deploy and dont refresh. Export the new node - you will see the correct format.

If you wanted to do it remotely you could have an http endpoint or another mqtt topic. You could then set the mqtt node using dynamic subscription settings. Read the help text in the sidebar, it will give you the properties you can set.

"credentials": {
        "user": "username",
        "password": "password"
    }

find it,be grateful!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.