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.