Rest API Authorization

Hi guys

Need to send authorisation token of the below mentioned REST Api with this token Dzca0UFcPZ1SCih9dL1zPx2PtKUCpLaUyNyeZW7ko1Y (This is Long Live Token generated from Home Assistant).


Possible to send the authorisation token with the above URL in a single command? what would be the syntax of this command need to execute this command on the browser.

I have ten such commands, need to execute them from a single click on the browser.

All help is appreciated. Thanks in advance.

Making authenticated requests using a long lived access token is explained here. You will need to send it in a request header: Authentication API | Home Assistant Developer Docs

Are you using some kind of framework like React? Do you want to do all this purely from the client side? You could look into pure JavaScript fetch, but that is very limited, and you might run into CORS issues.

I am saving REST API Commands in Node Red for Alexa to execute commands/scenes.

But I want to send HTTP Command with authorization in one line for it to be executable on NodeRed.

Thanks in advance @exxamlte

Sorry, I’m not using Node-RED myself. A quick search came up with this guide that shows how you can specify an HTTP command and it has a section about how to set a HTTP request header which is what you need.