Hello
When I try to login to the Zabbix API I always get an error.
I try to call the user.login method but somehow I always get "Invalid JSON. An error occurred on the server while parsing the JSON text."
This is the command that I use:
This is the respone that I get:
If I format these JSON in a JSON-formatter it seems to be valid, but somehow the server don't understand it.
I tried to omit the auth parameter but it didn't change anything.
I changed user.login with user.authenticate but without success.
Are there any logs on the server where I can see which methods are used and how the parsed data looks like?
Or does anyone see what I do wrong?
I am using zabbix_server version 4.0.13 with Apache version 2.4.29.
My server runs on Ubuntu version 18.04.3 LTS.
Thank you for any help!
When I try to login to the Zabbix API I always get an error.
I try to call the user.login method but somehow I always get "Invalid JSON. An error occurred on the server while parsing the JSON text."
This is the command that I use:
Code:
curl -i -X POST -H "Content-Type:application/json" -d '{"jsonrpc":"2.0","method":"user.login","params":{"user":"Admin","password":"zabbix"},"auth":null,"id":1}' http://172.27.0.162/zabbix/api_jsonrpc.php
Code:
{"jsonrpc":"2.0","error":{"code":-32700,"message":"Parse error","data":"Invalid JSON. An error occurred on the server while parsing the JSON text."},"id":null}
I tried to omit the auth parameter but it didn't change anything.
I changed user.login with user.authenticate but without success.
Are there any logs on the server where I can see which methods are used and how the parsed data looks like?
Or does anyone see what I do wrong?
I am using zabbix_server version 4.0.13 with Apache version 2.4.29.
My server runs on Ubuntu version 18.04.3 LTS.
Thank you for any help!
Comment