Updates the password of the current logged in user.
{warning} A user must have his/her account verified
| Method | Uri | Auth | Permissions |
|---|---|---|---|
| PUT | /v1/auth/password |
Bearer JWT-Token |
none |
The API requires a header Accept and Authorization to be submitted with the request:
{
"Accept": "application/json",
"Authorization": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3M..."
}
{
"password": ["required","confirmed"]
}
Condition : All required data provided is valid and added to the request body.
Code : 204 No COntent
Content example : Response will reflect back the created message':
HTTP/1.1 204 No Content
Server: nginx/1.18.0 (Ubuntu)
Connection: close
Cache-Control: no-cache, private
Date: Thu, 21 Jan 2021 10:51:02 GMT
X-RateLimit-Limit: 60
X-RateLimit-Remaining: 59
Condition : If a user has not logged in or header data is incomplete.
Code : 401 Unauthorized
Content example :
{
"message": "You must log in to do that.",
"errors": [
"Unauthenticated."
]
}
Code : 403 Forbidden
Content example :
{
"message": "Your email address is not verified."
}
Code : 422 Unprocessible Entity
Condition : If the email is not an email address
Content example :
Condition : If the password is confirmed with email_confirmation
{
"message": "The given data was invalid.",
"errors": {
"email": [
"Please confirm your password"
]
}
}