Page 1 of 1

Can't get API token Login denied for user

Posted: Wed Dec 04, 2024 1:12 pm
by DarkMechanikum
Hello,
I've recently installed the ZoneMinder in docker (https://hub.docker.com/r/dlandon/zoneminder) and now try to use API, but I can't get the token.
OPT_USE_AUTH is enabled
AUTH_HASH_SECRET is populated
OPT_USE_API is enabled
OPT_USE_LEGACY_API_AUTH is enabled

For the user, I am trying to log in ("Bot") the API is enabled, all other options set to edit or other max access.

according to the Guide on the API (https://zoneminder.readthedocs.io/en/stable/api.html), I try to get the token with
curl -X POST -k -d "user=Bot&pass=Bot_pass" https://labserver.local:8443/zm/api/host/login.json

But I get this:
{"success":false,"data":{"name":"Login denied for user "Bot"","message":"Login denied for user "Bot"","url":"\/zm\/api\/host\/login.json","exception":{"class":"UnauthorizedException","code":401,"message":"Login denied for user \"Bot\""}}}vla

What could be the problem?

Re: Can't get API token Login denied for user

Posted: Wed Dec 04, 2024 1:48 pm
by iconnor
Is api enabled for the user? Options->Users->Bot API Enabled checbox

Re: Can't get API token Login denied for user

Posted: Wed Dec 04, 2024 2:46 pm
by DarkMechanikum
Yes, it is.