Jsonrpc.php not working

No matter how I call jsonrpc.php I always get error 401. I tried all possible combinations described in the documentation without any success:

  • curl -H ‘X-API-Auth: API-Key-From-Admin’ -d ‘{“jsonrpc”: “2.0”, “method”: “getAllProjects”, “id”: 1}’ https://myhost/jsonrpc.php
  • curl -u “jsonrpc:API-Key-From-Admin” -d ‘{“jsonrpc”: “2.0”, “method”: “getAllProjects”, “id”: 1}’
  • curl -u “myuser:API-Key-From-myuser” -d ‘{“jsonrpc”: “2.0”, “method”: “getMyProjects”, “id”: 1}’
  • curl -u “myuser:Password-From-myuser” -d ‘{“jsonrpc”: “2.0”, “method”: “getMyProjects”, “id”: 1}’

None of the calls work. I always get error 401. There seems to be something really wrong with jsonrpc.php. Any ideas?

By the way, I also tried calling it from a C# executable on a Windows machine with the exact same results.

P.S.: Had to replace the URI with , because the forum form thinks I posted too many links. :smiley:

Are you using a reverse proxy?

Not sure, since it is hosted. Is there an easy way to find out?

And I’m running a reverse proxy.
https://hub.docker.com/r/jwilder/nginx-proxy

And that call is not working for me. I always get error 401.

I don’t know how to find out, probably this is only possible via the provider.

As far as I know, this API behavior only occurs when the reverse proxy is used for authentication at the kanboard.

https://docs.kanboard.org/en/latest/admin_guide/reverse_proxy_authentication.html

Are you using the reverse proxy for authentication or is it used for other purposes?

no, not authentication. missed that part.