I've just set up ZoneMinder v1.37.47 on Debian Bookworm with Apache2. I connect to ZoneMinder using a self-signed cert as the server is internal and not exposed to the Internet. The server is set up to redirect all HTTP requests on port 80 to HTTPS on 443. ZoneMinder's web UI all works perfectly. I can view the API outputs on a web browser just fine. I used curl to verify everything works:
Code: Select all
kit@Voyager ~ % curl -k -XPOST -d "user=admin&pass=xxxxxx" https://192.168.1.17/zm/api/host/getVersion.json
{"version":"1.37.47","apiversion":"2.0"}%
kit@Voyager ~ % curl -k -XPOST -d "user=admin&pass=xxxxxx" https://192.168.1.17/zm/api/host/login.json
{"access_token":"xxxxxxxxxxxx","access_token_expires":7200,"refresh_token":"xxxxxxxxxx","refresh_token_expires":86400,"credentials":"auth=xxxxxxxxxxxx","append_password":0,"version":"1.37.47","apiversion":"2.0"}%
kit@Voyager ~ % curl -k -XPOST -d "user=admin&pass=xxxxxxx" https://192.168.1.17/zm/api/monitors.json
{"message":{"Name":["Monitor Name must be specified for creation","Monitor Name must be specified for creation"]}}%
kit@Voyager ~ %
I've spent hours on Google, and reading the zmninja docs from cover to cover and I can't find what the issue is. I'm sure it's something simple I'm overlooking.
I've tried:
- Clearing the API cache
- Using "Basic" Authentication
- Accessing the Zoneminder API on the tablet via the web browser which works
- Enabled and disabled "strict SSL check" in developer options
- Enabled HTTP on apache2 and disabled it
- Double checked "AUTH_RELAY" is set
- "AUTH_HASH_SECRET" is populated
- "AUTH_HASH_IPS" is disabled
- "OPT_USE_APIS" is enabled
- "OPT_USE_GOOG_RECAPTCHA" is disabled
- "OPT_USE_AUTH" is enabled
I can't extract the logs in zmninja, but I could take screenshots, shown below.
Any ideas what I can do, please?