Issue with X-HASSIO-KEY header (possible fix)

There is still an issue about the X-HASSIO-KEY giving an 401 error on Hassio.

I have tried several clean installs and old versions, but everytime the same issue occurs,
As of yet, I cannot understand why, but I have changed in this on line 478:

headers[“Authorization”] = “Bearer %s” % os.environ[“HASSIO_TOKEN”]

Together with setting “homeassistant_api”: true in the addon config.json this works.
My change is also on the http example page:

I have created a pull request, it is beyond me why x-hassio-key does not work (anymore) but I think the Authorization is a more generic approach anyway

1 Like

Thanks for the merge, I have tested the new version ( and it works!

1 Like