# Injecting flow loaded in memory into running node-red not working

**URL:** <https://discourse.nodered.org/t/injecting-flow-loaded-in-memory-into-running-node-red-not-working/94659>\
**Category:** General\
**Tags:** inject\
**Created:** [15 January 2025 23:28 UTC](https://discourse.nodered.org/t/injecting-flow-loaded-in-memory-into-running-node-red-not-working/94659 "2025-01-15T23:28:38Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![pcborges](https://avatars.discourse-cdn.com/v4/letter/p/8edcca/32.png) [@pcborges](https://discourse.nodered.org/u/pcborges)\
**Post date:** [15 January 2025 23:28 UTC](https://discourse.nodered.org/t/injecting-flow-loaded-in-memory-into-running-node-red-not-working/94659/1 "2025-01-15T23:28:38Z")

</div>

Hi, I have an application where the flow is delivered encrypted.  
The idea is that when the system boots a javascript script will decrypt the flow, load it straight into memory then inject into the node-red environment.  
According to mostly ChatGPT's help I am using a scrypt for this purpose that sucessfully decripts the flow but fails to inject. When run it I get a message:  
Error injecting flows: 401 Unauthorized

I checked credentials at the decrypt scrypt and included them in the settings.js as below:

> ```
> httpNodeAuth: {
> user: "myusername",
> pass: "$2y$08$xt16.Rj52LtNuN9./Nmr5GUgnZe54fvH6......."
> },
> 
> // Protect static files served at `/`
> httpStaticAuth: {
> user: "myusername",
> pass: "$2y$08$xt16.Rj52LtNuN9./Nmr5GUgnZe54fvH6......."
> },
> 
> adminAuth: {
> "type": "credentials",
> "users": [
> {
> "username": "myusername",
> "password": "$2y$08$xt16.Rj52LtNuN9./Nmr5GUgnZe54fvH6.......",
> "permissions": "*"
> }
> ]
> },
> 
> ```

Editor and dashboard work ok with authentication with these settings.

What does ChatGPT and myself are missing here?  
Assistance welcome.

Note: credentials edited for publishing online

Just tested:  
curl -X GET [http://localhost:1880/flows](http://localhost:1880/flows) -u myusername:$2y$08$xt16.Rj52LtNuN9./Nmr5GUgnZe54fvH6.......  
Unauthorized

---

<div class="post-metadata">

**Author:** ![gregorius](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/gregorius/32/73816_2.png) [@gregorius](https://discourse.nodered.org/u/gregorius)\
**Post date:** [17 January 2025 08:15 UTC](https://discourse.nodered.org/t/injecting-flow-loaded-in-memory-into-running-node-red-not-working/94659/2 "2025-01-17T08:15:03Z")

</div>

> [@pcborges](#):
>
> `password": "$2y$08$xt16.Rj52LtNuN9./Nmr5GUgnZe54fvH6......."`

is that the _encrypted_ password?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [17 April 2025 08:15 UTC](https://discourse.nodered.org/t/injecting-flow-loaded-in-memory-into-running-node-red-not-working/94659/3 "2025-04-17T08:15:07Z")

</div>

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