API token v2.0 Question * SOLVED *

Forum for questions and support relating to the 1.34.x releases only.
Post Reply
LBDG
Posts: 20
Joined: Mon Jun 23, 2014 10:17 am

API token v2.0 Question * SOLVED *

Post by LBDG »

Solved. The token must be passed as data in the query (was in the documentation)


From the document https://zoneminder.readthedocs.io/en/stable/api.html

Login using API 2.0 token (OK)

then

The following command functions as intended
curl -k -XGET https://server/zm/api/events/index/MonitorId:1.json?token=...token... (OK returns data as expected)

but if I add pagination, it fails with "401" not authenticated
curl -k -XGET https://server/zm/api/events/index/MonitorId:1.json?page=1?token=...token... (ERROR 401)

The document doesn't show how to add token and pagination. I wonder what I am doing wrong or missing?
Post Reply