How to pass the token to the [http in] node?

Hi team,
I set the adminAuth

     adminAuth: {
        type: "credentials",
        sessionExpiryTime: 7200,
        users: [

         {
            username: "ne323nqa",
            password: "$2b$08$1aRZsE3232j0wg73rlS1oB.K.QcV0uQsdGm1W4GUj2QkD4NVqe5ZdMxu", 
            permissions: "*"
        }

     ],

And also set the httpNodeAuth

   httpNodeAuth: {user:"ne323nqa",pass:"$2b$08$1aRZsE3232j0wg73rlS1oB.K.QcV0uQsdGm1W4GUj2QkD4NVqe5ZdMxu"},

But when I used the admin API [/auth/token] to produce an access token and the pass to the [http in] node, it told me that Unauthorized.
And I used the postman to call the API[http in], I also set the header :Authorization, but it didn't work, still said Unauthorized.

This is my http in node

IF I used the basic auth, I can call the api from postman:

The adminAuth security only applies to the editor and admin apis of Node-RED. It does not apply to the routes created in the flow, such as the HTTP In nodes.

The only built-in security we provide for the HTTP In nodes is the httpNodeAuth basic authentication option.

1 Like

Thanks knolleary,
I will use basic auth instead

Or use external auth if you want more. Lots of people have written about using something like NGINX as a reverse proxy and configuring the auth there since there are lots of tools and articles on doing that.

Thanks, will do that

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