I have an addon that stopped working and it seems like a simple problem to solve but no matter what I try it doesn’t fix anything. The environment variable HASSIO_TOKEN is set but when I make a request I get a 401 response and the system logs say API access is not permitted. What am I doing wrong?
config.json
{
...
"startup": "application",
"boot": "auto",
"host_network": false,
"hassio_api": true,
"homeassistant_api": true,
...
}
Code
const conf = {
headers: {
'X-HASSIO-KEY': process.env.HASSIO_TOKEN,
'x-ha-access': process.env.HASSIO_TOKEN,
}
};
Axios.post('http://hassio/homeassistant/api/services/device_tracker/see', msg, conf)
.catch(err => winston.error(err.message));
Hassio System Logs
18-08-01 10:43:21 WARNING (MainThread) [hassio.api.proxy] Not permitted API access: local_life360
18-08-01 10:43:21 WARNING (MainThread) [hassio.api.proxy] Not permitted API access: local_life360