Skip to content

Change User Password

Request URL

POST /user/change-password

Description

Change the password of the currently logged in aggregator user.

Schema

Property table for user/change-password

Property Description Required Schema
oldPassword The user's old (current) password Yes {
  "type": "string",
  "minLength": 1,
  "maxLength": 50,
  "$id": "common-password"
}
newPassword The user's desired new password (should contain at least one of each: a digit, a special symbol, a lowercase letter, and an uppercase letter) Yes {
  "type": "string",
  "pattern":
"(?=.[0-9])(?=.[!@#$%^&])(?=.[a-z])(?=.[
A-Z])[0-9a-zA-Z!@#$%^&
]{8,}",
  "minLength": 8,
  "maxLength": 50
}

Request Body

{
    "oldPassword": "123CLIENTID!",
    "newPassword": "123Newpw!"
}

Snippet Examples

javascript

const axios = require('axios');
const data = {
    "oldPassword": "123CLIENTID!",
    "newPassword": "123Newpw!"
};
const config = {
  method: 'POST',
  url: '${CONNECTFI_BASE_URL}/user/change-password',
  headers: {
    'Content-Type': "application/json",
    'x-connectfi-token': "A long random string token received from /auth/get-token request"
  },
  data
};

let result;
try {
  result = await axios.request(config);
  if (result.status === 200) {
    console.log(JSON.stringify(result.data));
  }
} catch (err) {
  console.log({
    errCode: err.code,
    responseStatus: err.response && err.response.status,
    data: err.response && JSON.stringify(err.response.data)
  });
}

cURL

curl --location "CONNECTFI_BASE_URL/user/change-password" --data "{    \"oldPassword\":\"123CLIENTID!\",   \"newPassword\":\"123Newpw!\"}" --header "Content-Type: application/json" --header "x-connectfi-token: A long random string token received from /auth/get-token request" 

Successful Response Examples

200 TRANSFER-TO/WIRE/LIST SUCCESSFUL RESPONSE USING DATE RANGE AND NUMBEROFRECORDS COPY

HEADERS

Header Value
Content-Type application/json
x-connectfi-token A long random string token received from /auth/get-token request

REQUEST BODY

{
    "oldPassword": "123CLIENTID!",
    "newPassword": "123Newpw!"
}

RESPONSE BODY

{
    "code": "0", //Success
    "data": {
        "status": true
    },
    "requestId": "3ec05680b7a611edaaa621b3360f38c0"
}