Update client password
PUT
https://gestion-bibliotique-pfe.netlify.app/api/clients/password
Maintainer:Nassim MZILI
@access Client
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request PUT 'https://gestion-bibliotique-pfe.netlify.app/api/clients/password' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY3YjE0OTMwNGNjNmIxMjE0M2VjZjdkMSIsInJvbGUiOiJjbGllbnQiLCJpYXQiOjE3Mzk2NzIxNjMsImV4cCI6MTczOTc1ODU2M30.IqU1VOYVE8bN1l19KvLPtI9fHZh9PFn6hrtmikiZOI8' \
--header 'Content-Type: application/json' \
--data-raw '{
"oldPassword": "j7QzxtXoTXrJSMR",
"newPassword": "_gpmsDWfAAoAdOt43",
"confirmPassword": "_gpmsDWfAAoAdOt43"
}'
Response Response Example
200 - Success
{
"success": true,
"message": "Password updated successfully!",
"data": {
"client": {
"_id": "Tlqzk_VmDyc_1_ITdSVmO",
"nom": "Nancy Harris",
"email": "Dallin.Wunsch@hotmail.com",
"adresse": "7591 Jakubowski Burgs",
"active": false,
"role": "admin",
"socials": {
"linkedin": "https://superior-formula.biz",
"website": "https://prickly-hoof.name/",
"github": "https://querulous-aftermath.net",
"bio": "https://lazy-vision.info/"
},
"wishlist": [],
"profilePic": "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZlcnNpb249IjEuMSIgYmFzZVByb2ZpbGU9ImZ1bGwiIHdpZHRoPSIyNzE2IiBoZWlnaHQ9IjM3NjMiPjxyZWN0IHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9IiNiNzNiMTMiLz48dGV4dCB4PSIxMzU4IiB5PSIxODgxLjUiIGZvbnQtc2l6ZT0iMjAiIGFsaWdubWVudC1iYXNlbGluZT0ibWlkZGxlIiB0ZXh0LWFuY2hvcj0ibWlkZGxlIiBmaWxsPSJ3aGl0ZSI+MjcxNngzNzYzPC90ZXh0Pjwvc3ZnPg=="
}
}
}
Request
Header Params
Authorization
string
required
Example:
Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY3YjE0OTMwNGNjNmIxMjE0M2VjZjdkMSIsInJvbGUiOiJjbGllbnQiLCJpYXQiOjE3Mzk2NzIxNjMsImV4cCI6MTczOTc1ODU2M30.IqU1VOYVE8bN1l19KvLPtI9fHZh9PFn6hrtmikiZOI8
Body Params application/json