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:
Is this API method functional?
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:
Is this API method functional?