Path:
POST /auth/change-password
Through this endpoint, we enable a logged in user to change the password, directly from the UI. We are flexible on password formats, so users can use their own choice of password that is easier for them to remember.
Content-Typeapplication/json
application/json
application/json
Type: Body
Name: System user ID, previous password, and new password.
Required: true
{"userId": "5e97947d3cb8553c0e43d87f","oldPassword": "ExamplePassword1234!","newPassword": "ExamplePassword123!"}
HTTP Code : 200 Message : OK
Description: You will see this message when the password has been successfully changed.
Sample
{"_id": "5e97947d3cb8553c0e43d87f","isActive": {"status": true},"registrationDate": "2020-04-15T22:34:22.429Z","expiryDate": "2070-04-15T22:34:22.429Z","roles": ["5de1646f8c6352091d944f1c"],"name": {"first": "John","middle": "A","last": "Doe"},"phone": [{"_id": "5e97947d3cb8553c0e43d880","number": "123456789","countryCode": "+1","extension": "1234","kind": "mobile","id": "5e97947d3cb8553c0e43d880"}],"email": "johndoe@fabric.inc","extra": {"resetPassword": "requested"},"registrationSite": "abcde.com","account": "5e97947d3cb8553c0e43d87e","userId": 90,"address": [],"provider": [{"registrationDate": "2020-04-15T22:34:22.429Z","isActive": true,"_id": "5e97947d3cb8553c0e43d881","name": "LOCAL","lastLoginDate": "2020-04-16T18:10:42.600Z","id": "5e97947d3cb8553c0e43d881"}],"createdAt": "2020-04-15T23:10:53.773Z","updatedAt": "2020-04-16T18:11:39.361Z","__v": 0}
HTTP Code : 404 Message : Not Found
Description: You will see this message when the system user ID and/order previous password is incorrect.
Sample
{"code": "USER_NOT_FOUND","message": "User not found."}
Last updated - July 2020