Schimba parolă
Schimba parolă utilizatorului.
Endpoint
http
POST /api/v1/user/passwordParametri
Parametri body
| Parametru | Tip | Obligatoriu | Descriere |
|---|---|---|---|
current | string | yes | Parola curentă a utilizatorului. |
password | string | yes | Noua parolă a utilizatorului. |
password_confirmation | string | yes | Confirmarea noii parole a utilizatorului. |
Exemplu de cerere
sh
curl --location --request POST 'https://files.ro/api/v1/user/password' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {token}' \
--data-raw '{
"current": "filesro",
"password": "filesro",
"password_confirmation": "filesro"
}'Răspuns
json
{
"type": "success",
"message": "The password was successfully changed."
}json
{
"type": "error",
"message": "You are not authorized"
}json
{
"message": "The given data was invalid.",
"errors": {
"field": [
"The field is required."
]
}
}