Skip to content

Update Password

API Description

  • Path: /client/member/update-password
  • Method: POST
  • Description: Update the password for the currently logged-in member. This API requires the member's exclusive Token in the request header for authentication.

Request Parameters

Header Parameters

ParameterTypeRequiredDescription
AuthorizationStringYesFormat: Bearer <token>, where <token> is obtained after a successful login or registration.

Body Parameters (JSON or Form Data)

ParameterTypeRequiredDescription
oldPasswordStringYesThe current password
newPasswordStringYesThe new password
confirmPasswordStringYesConfirm the new password (must match newPassword)

Request Example

http
POST /client/member/update-password HTTP/1.1
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR...
Content-Type: application/json

{
  "oldPassword": "old_password_123",
  "newPassword": "new_password_456",
  "confirmPassword": "new_password_456"
}

Response Parameters

ParameterTypeDescription
codeNumberStatus code, 0 means success
msgStringResponse message
dataObjectEmpty object {} or null on success

Response Example

Success

json
{
  "code": 0,
  "msg": "success",
  "data": {}
}

Failure (Passwords do not match)

json
{
  "code": 7,
  "msg": "newPassword and confirmPassword do not match",
  "data": {}
}

Failure (Invalid Old Password)

json
{
  "code": 7,
  "msg": "invalid old password",
  "data": {}
}