Can't get API token Login denied for user

Support for the docker image maintained by dlandon
Post Reply
DarkMechanikum
Posts: 2
Joined: Wed Dec 04, 2024 12:56 pm

Can't get API token Login denied for user

Post 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?
Last edited by DarkMechanikum on Wed Dec 04, 2024 3:12 pm, edited 1 time in total.
User avatar
iconnor
Posts: 3349
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

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

Post by iconnor »

Is api enabled for the user? Options->Users->Bot API Enabled checbox
DarkMechanikum
Posts: 2
Joined: Wed Dec 04, 2024 12:56 pm

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

Post by DarkMechanikum »

Yes, it is.
Post Reply