Change Password
Change user password.
Endpoint
http
POST /api/v1/user/passwordParameters
Body parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
current | string | yes | The current user password. |
password | string | yes | The new user password. |
password_confirmation | string | yes | The new user password confirmation. |
Request example
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"
}'Response
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."
]
}
}