Zoneminder API authentication


#1

I’m looking to try and use mode states to determine whether my cameras in zoneminder should record or not. I have the mode states working based on presence detection and I have my cameras in zoneminder set to record etc based on the running state. I can change the state using a curl of a json file in the zoneminder API.

I’m still new to webcore so I’m not sure of the best method to handle the authentication for the API.

As per this page there is a curl way to log in for API calls: https://zoneminder.readthedocs.io/en/stable/api.html#login-logout-api-security

I’d then need to run another curl: https://zoneminder.readthedocs.io/en/stable/api.html#run-state-apis

Any thoughts on the best way to go about this? I could put the login details in the URL I think but I’d prefer not to.

Thanks