Disable API authentication


is it possible to completely disable the API authentication for debugging & development purposes?

Implicit user is not enough in your case?

Not sure if my issue has to do with authentication at all, that’s why I wanted to completely disable API auth to see whether this is the cause of the error. Implicit user role is already enabled.

My issue is that the Hue Emulation Binding does not work with Alexa. Hue Emulation API is throwing

[{"error":{"address":"/","description":"Not Authorized","type":4}}]

when called via browser.

1 Like

Did you spot the extra bit in the Hue Emulation documentation about setting up a reverse proxy to get Alexa working?

  • For Amazon Echo the pairing process may fail due to a 302 response from openHAB, this can be resolved by using a reverse proxy to change the request url from /api to /api/, for example nginx with the following configuration:
  server {
    listen 80;
    location /api {
      proxy_pass http://localhost:8080/api/;

Yes. To be really sure, I didn’t setup the proxy but letting run openhab as root and directly on port 80. For now want to get it to work first and then turning on all security measures one by one again to see what is the problem.

EDIT: I just saw that it’s also about modyfing the url with the reverse proxy. Will try that now…

The problem is related to the format of the URL Alexa is using when trying to get the API key during pairing.

Alexa is using /api, but the Hue Emulator will not see that request unless it’s /api/.

I don’t know if this is a recent change to Alexa or it’s due to the changes in OH3/Hue Emulator which means /api no longer works. Either way I couldn’t find a way to fix that in the code, so the reverse proxy workaround is needed.

@MikeJMajor Unfortunately, it still doesn’t work. I’d like continue the Hue+Alexa discussion in a separate thread: Getting Hue emulation working with Alexa again. Would be glad if you could help, thanks!

Independently from my current issue, I think the original question is still valid and worth keeping open. It would help to have a possibility completely turning off authentication just to verify whether issues are related to authentication at all.

1 Like

Some sort of debug mode to exclusively disable the auth via config would be useful.
Maybe even time limited with automatic reactivation.

It looks like if you stop the bundle org.openhab.core.io.rest.auth authentication is disabled.



Yes did a test too. Works like a charm. Thanks @hilbrand.

i’ve tried it also and it works. But when I log in, openhab always gets stuck and I can no longer see my things, item etc, so like in the screenshot. So to speak, the GUI no longer works!?

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