API not working?
Posted: Sat Jun 04, 2022 9:33 pm
I have a problem I can't seem to figure out. I don't believe the API portion is working, despite the fact I thought I had everything setup for it. On my Options -> System page, I have set OPT_USE_AUTH to enabled, AUTH_TYPE to builtin, AUTH_RELAY is hashed, AUTH_HASH_SECRET has a secret phrase created, AUTH_HASH_IPS is NOT enabled, AUTH_HASH_TTL is set to 2 hours, AUTH_HASH_LOGINS is enabled, ENABLE_CSRF_MAGIC is enabled (although I'm not quite sure what it does), OPT_USE_API is enabled, and OPT_USE_LEGACY_API_AUTH is enabled.
Under Options -> API, I have two different user accounts that have the API enabled.
I then followed the instructions on https://wiki.zoneminder.com/API about typing in "curl -X POST -d "user=somename&pass=somepass" http://serverip/zm/api/host/getVersion.json"... obviously changing the variables, such as my user and password and the server IP. When I submit the curl statement, absolutely nothing happens. I just get the prompt back immediately with nothing displayed. I would think that something ought to display to ensure it exits.
My reason for wanting this to work properly is primarily so that I can use a mobile app from my phone. I have both zmNinja and "Surveillance Pro" installed on my phone and they used to work before I gutted everything and started over from scratch.
Under Options -> API, I have two different user accounts that have the API enabled.
I then followed the instructions on https://wiki.zoneminder.com/API about typing in "curl -X POST -d "user=somename&pass=somepass" http://serverip/zm/api/host/getVersion.json"... obviously changing the variables, such as my user and password and the server IP. When I submit the curl statement, absolutely nothing happens. I just get the prompt back immediately with nothing displayed. I would think that something ought to display to ensure it exits.
My reason for wanting this to work properly is primarily so that I can use a mobile app from my phone. I have both zmNinja and "Surveillance Pro" installed on my phone and they used to work before I gutted everything and started over from scratch.