User
This endpoint is used to manage users (aggregators).
Endpoint or Section | Action |
---|---|
/user/change-password | Change the password of the currently logged in user (aggregator) |
Change User Password
Request method and URL:
POST /user/change-password
Description:
Change the password of the currently logged in aggregator user.
Required Properties | Description | Schema | Example Values |
---|---|---|---|
oldPassword | The user's old (current) password, 1-50 characters | string | "demo" |
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), 8-50 characters | string, regex: "(?=.[0-9])(?=.[!@#$%^&])(?=.[a-z])(?=.[A-Z])[0-9a-zA-Z!@#$%^&]{8,}" | "123Demo!" |
Request headers:
{
"Content-Type": "application/json",
"x-connectfi-token": "a long random string" //Authorization token received from /auth/get-token request
}
Request body example:
Possible responses:
200 (HTTP response status code) -- Success, password was updated
{
"code": "0", //Success
"data": {
"status": true
},
"requestId": "3ec05680b7a611edaaa621b3360f38c0"
}
400 (HTTP response status code) -- Wrong old password
{
"requestId": "8d93b610b7a811edaaa621b3360f38c0",
"code": "wrongOldPassword",
"message": "Wrong old password (login=demo)"
}
400 (HTTP response status code) -- Must have 8-50 characters
{
"requestId": "b9914ed0b7a811edaaa621b3360f38c0",
"code": "requestValidateError",
"context": [
{
"instancePath": "/newPassword",
"schemaPath": "#/properties/newPassword/minLength",
"keyword": "minLength",
"params": {
"limit": 8
},
"message": "must NOT have fewer than 8 characters"
}
]
}
400 (HTTP response status code) -- Must match regex pattern
{
"requestId": "cf0196d0b7a811edaaa621b3360f38c0",
"code": "requestValidateError",
"context": [
{
"instancePath": "/newPassword",
"schemaPath": "#/properties/newPassword/pattern",
"keyword": "pattern",
"params": {
"pattern": "(?=.*[0-9])(?=.*[!@#$%^&*])(?=.*[a-z])(?=.*[A-Z])[0-9a-zA-Z!@#$%^&*]{8,}"
},
"message": "must match pattern \"(?=.*[0-9])(?=.*[!@#$%^&*])(?=.*[a-z])(?=.*[A-Z])[0-9a-zA-Z!@#$%^&*]{8,}\""
}
]
}
400 (HTTP response status code) -- Missing required property