Update user password
PUThttps://demo.frigate.video/api/users/:username/password
Updates a user's password. Users can only change their own password unless they have admin role. Requires the current password to verify identity for non-admin users. Password must meet strength requirements:
- Minimum 8 characters
- At least one uppercase letter
- At least one digit
- At least one special character (!@#$%^&*(),.?":{}|<>)
If user changes their own password, a new JWT cookie is automatically issued.
Request​
Path Parameters
username Usernamerequired
- application/json
Bodyrequired
passwordPassword (string)required
Responses​
- 200
- 400
- 401
- 403
- 404
- 422
Successful Response
- application/json
- Schema
Schema
Bad Request - Current password required or password doesn't meet requirements
Unauthorized - Current password is incorrect
Forbidden - Viewers can only update their own password
Not Found - User not found
Validation Error
- application/json
- Schema
- Example (auto)
Schema
detail object[]
{
"detail": [
{
"loc": [
"string",
0
],
"msg": "string",
"type": "string"
}
]
}
- python
- nodejs
- javascript
- curl
- rust
- HTTP.CLIENT
- REQUESTS
import http.client
import json
conn = http.client.HTTPSConnection("demo.frigate.video")
payload = json.dumps({
"password": "string"
})
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json'
}
conn.request("PUT", "/api/users/:username/password", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
ResponseClear