Edit Configuration for MQTT node

I am trying to set the configuration of the MQTT node (username and password) from outside the node.
For example ->
I get an authentication token after making a REST Api call. I need to set the token as username for the MQTT. How do I set the property?

Do you mean that you want to change the configuration after node-red is running? I believe that is not possible, at least with the standard MQTT nodes.

The standard MQTT nodes do not provide a method to dynamically change the configuration properties.

After doing a post request in Node-red, I get a token which I have to use as username for MQTT dynamically.

So, Do I have to make a custom MQTT node to accomplish this? If yes, How should I proceed doing it?

always worth checking on flows.nodered.org
this may be close - or may not - https://flows.nodered.org/node/node-red-contrib-mqtt-dynamictopic

I have exactly the same needs, have you found a solution?

I found a similar solution.
You can refer this https://github.com/yashjain28/node-red-contrib-clearblade-mqtt
I wanted to create the similar node with library dependencies that supports node version installed on my gateway.You will have to create a custom node.

thank you for your suggestions,I have create a custom node of MQTT, probably my lack of programming experience, it's not ideal to use.:joy: