Hi guys
I'm trying to building a specific front-end using ZoneMinder's API.
I am able to connect using the API and retrive all informations about the monitores and other stuffs, but I couldnt find how to get the
video streaming from a specific monitor to embembed it in my code... I know i can do this using something like that <img src="https://example.com/zm/cgi-bin/nph-zms? ... ****&pass=***********" alt="Front Door">... But I really wanna know if I can get this without use the user and pasword directily on html code since I am already have logged using the API...
Thanks and sorry about my poor english !
Get video streaming through API
Re: Get video streaming through API
If you don't want to use "user=&pass=", you can replace it by "&auth=" (better). However, doing this requires more steps:
1. You need to log into the web console of ZoneMinder. There is no API for login today, so you'll have to write code to do an "HTTP POST" to "/zm/index.php". See this for an example
2. Once you are logged in, you can use the new "getCredentials.json" API (its in master) to get the auth key. There is no documentation on it yet but this thread will give you information on how to use it
Its more complex than a stateless user=&pass= but is better
1. You need to log into the web console of ZoneMinder. There is no API for login today, so you'll have to write code to do an "HTTP POST" to "/zm/index.php". See this for an example
2. Once you are logged in, you can use the new "getCredentials.json" API (its in master) to get the auth key. There is no documentation on it yet but this thread will give you information on how to use it
Its more complex than a stateless user=&pass= but is better
I no longer work on zmNinja, zmeventnotification, pyzm or mlapi. I may respond on occasion based on my available time/interest.
Please read before posting:
How to set up logging properly
How to troubleshoot and report - ES
How to troubleshoot and report - zmNinja
ES docs
zmNinja docs
Please read before posting:
How to set up logging properly
How to troubleshoot and report - ES
How to troubleshoot and report - zmNinja
ES docs
zmNinja docs
Re: Get video streaming through API
This will be useful to me if the auth keys can be set to never expire. Not for security reasons, but for memory constrained devices (e.g. Arduino) that require some tricks to parse the API auth HTTP response in RAM if using username / password.
Re: Get video streaming through API
check out -> https://s h i n o b i.video/docs/cameras (remove the spaces, their only there to prevent auto-correction)My notes on Zoneminder:
https://wiki.zoneminder.com/Dummies_Guide
How to find camera paths:
https://wiki.zoneminder.com/Finding_Camera_Stream_Paths