Set a new password with a reset token or code
Access: Public, no token needed.
Completes a password reset. If token is exactly 4 characters long it is treated as the mobile code and email is required; otherwise it is treated as the JWT from the reset link and email is ignored. The token or code must be the most recently issued one for the account.
On success the password is replaced, the reset token is cleared and the stored refresh token is removed, so POST /auth/refresh-token fails until the user signs in again. Access tokens that were already issued stay valid until they expire, and the session list is not cleared. A password_changed notification ("Password Changed") is created, delivered in-app, by push and by email according to the user's systemUpdates preferences. No tokens are returned.
Error statuses for a bad link token are inconsistent: a malformed token gives 400, an expired one gives 500.
application/json- body
token*stringEither the JWT from the reset link, or the 4-digit code from the mobile reset email.
password*stringThe new password, 8-128 characters.
8 <= length <= 128email?stringAccount email. Required when token is a 4-digit code; ignored for link tokens.
emailPassword changed
application/json- response
status*integersuccess*booleanmessage*stringdata*unknowncurl -X POST 'http://localhost:4000/api/v1/auth/reset-password' \ -H 'Content-Type: application/json' \ -d '{ "token": "4821", "password": "N3w-S3cure-Passw0rd", "email": "adaeze.okonkwo@example.com"}'{ "status": 200, "success": true, "message": "Password reset successfully. Please sign in with your new password.", "data": null}
HomeLink Hub