I’m trying to access the Node-Red api.
OS: Home Assistant OS 5.12
Node-Red Community Addon: 8.2.0
The Node-Red docs tell me to add a user and hashed password to the
adminAuth object in
/config/node-red/settings.js file mentions the
adminAuth object is controlled by the addon and removed. it further states ‘known as users in the add-on configuration’.
First hurdle was the actual url of api to get the token. All Node-Red docs mention
http://localhost:1880/auth/token however this url get me a
Status code 500: Internal Server Error.
Some digging around I read that the url from the Node-Red docs probably end up in the Home Assistant server and for urls to an addon I should add
/endpoint to the url.
So I think the url should be
http://localhost:1880/endpoint/auth/token. On this I get a
Status code 401: Unauthorized.
I don’t know what username or password I can use to access the api. I tried the http_static and http_node users, Home Assistant users, and even (against all odds) tried to add the
adminAuth object to the settings.js file anyways, but to no avail. Everytime I get the unautorized result.
My question is, how to access the Node Red api when using the Node Red addon?