Ad Widget

Collapse

API error, Invalid Params, Data: Not Unauthorized

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • beescreamer
    Junior Member
    • Jul 2025
    • 1

    #1

    API error, Invalid Params, Data: Not Unauthorized

    Hello,

    I am trying to get the Zabbix Automapper to work, and through some trouble shooting I found the reason it couldn't retrieve the map info was because of the error above.

    Going down the troubleshooting rabbit hole, I have been just using a curl request to test with the same issue:

    curl --request POST --url 'http://{webserver/zabbix/api_jsonrpc.php' --header 'Authorization: Bearer 97867433d62fdcdb6286bf1c73fa7356' --header 'Content-Type: application/json-rpc' --data '{"jsonrpc": "2.0","method": "user.get","params": {"output":"extend"},"id": 5}'

    {"jsonrpc":"2.0","error":{"code":-32602,"message":"Invalid params.","data":"Not authorized."},"id":5}

    I have confirmed my account is authorized for the api, as it is a super admin, I have tried with the builtin zabbix admin. I have tried using the token created in the webpage, as well as using the token given using the user.login method. I am able to use the API for that, as well as get the apiinfo.version request, so that part is working. the version is 7.2.7

    We have also added in the following to our nginx proxy as recommended in the Zabbix documentation and restarted the service:

    proxy_set_header Authorization $http_authorization;
    proxy_pass http://{webserverIP}/zabbix/;

    not sure what else to try, so after 24 hrs decided to post my first post here!

    Thanks!
Working...