Gestion de Bibliotique
Home
API
  • Client > Authentification
  • Client > Profile
  • Client > CRUD
  • Livres
  • Emprunts
  • Categories
Team
  • Nassim MZILI
  • Abderrahim El Ouali
Home
API
  • Client > Authentification
  • Client > Profile
  • Client > CRUD
  • Livres
  • Emprunts
  • Categories
Team
  • Nassim MZILI
  • Abderrahim El Ouali
GitHub
GitLab
  1. Profile
  • Get Started
  • API
    • Clients
      • Auth
        • Register a new client
        • Login a client
        • Logout a client
      • Profile
        • Update client profile
          PUT
        • Update client password
          PUT
        • Get client details
          GET
        • Get all emprunts for a client
          GET
      • CRUD (Admin)
        • Get all clients
        • Get a client by ID
        • Update a client
        • Delete a client
    • Livres
      • Get all books
      • Get a book by ID
      • Add a new book
      • Update a book
      • Delete a book
    • Emprunts
      • Create a new emprunt
      • Get emprunt by ID
      • Update an emprunt
      • Delete an emprunt
      • Get all emprunts
      • Get all emprunts for a specific client
      • Return a book
    • Categories
      • Get all categories
      • Get a category by ID
      • Add a new category
      • Update a category
      • Delete a category
  1. Profile

Update client password

PUT
https://gestion-bibliotique-pfe.netlify.app/api/clients/password
password
Maintainer:Nassim MZILI

@access Client#

Request

Header Params
Authorization
string 
required
Example:
Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY3YjE0OTMwNGNjNmIxMjE0M2VjZjdkMSIsInJvbGUiOiJjbGllbnQiLCJpYXQiOjE3Mzk2NzIxNjMsImV4cCI6MTczOTc1ODU2M30.IqU1VOYVE8bN1l19KvLPtI9fHZh9PFn6hrtmikiZOI8
Body Params application/json
oldPassword
string 
required
newPassword
string 
required
confirmPassword
string 
required
Example
{
  "oldPassword": "j7QzxtXoTXrJSMR",
  "newPassword": "_gpmsDWfAAoAdOt43",
  "confirmPassword": "_gpmsDWfAAoAdOt43"
}

Request samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
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"
}'

Responses

🟢200Success
application/json
Body
success
boolean 
required
message
string 
required
data
object 
required
client
object 
required
Example
{
  "success": true,
  "message": "Password updated successfully!",
  "data": {
    "client": {
      "_id": "ZtuZEItdoV7Pc33kLjpYJ",
      "nom": "Melanie Marquardt",
      "email": "Royce27@gmail.com",
      "adresse": "8312 Nadia Mills",
      "role": "client"
    }
  }
}
🟠401Unauthorized
🟠400Bad Request
🔴500Server Error
Previous
Update client profile
Next
Get client details
Built with