REST API 2.0 /auth/check_user Always Returns False

kevanbrown

Dabbler
Joined
Mar 19, 2012
Messages
17
Attempting to use the REST API 2.0 to check user credentials via /auth/check_user. However, this always returns false with a local test user account I have created even though I know I'm passing the correct username and password in the JSON body.

Here's an example in PowerShell:

PS C:\> Invoke-RestMethod -Uri 'https://<truenas_ip>/api/v2.0/auth/check_user' -Method Post -Headers @{Authorization="Bearer $TRUENAS_API_KEY"} -Body '{"username": "tuser", "password": "P@ssw0rd"}'
False

Same in Postman:

1629223247782.png



Is this API method functional?
 

gladoskar

Cadet
Joined
Jul 27, 2022
Messages
1
Hey - I tried around with it for a while and i'm pretty sure this endpoint is only for the web login, meaning it only authorizes `root`.
 
Top