Skip to content

Change Personal Password by Original Password

There are three ways to change a personal password:
Change Password by Mobile Phone
Change Password by Email
Change Password by Old Password

This article mainly describes how to change a personal password by old password.

After the user logs in successfully, call the Check Whether User Set Password API before calling this API. If a password has already been set, the original password must be passed in the parameters; if no password has been set, only the new password needs to be passed.

This is a post-login API. You need to add authorization information in the header: Authorization.

Request Description

Request Headers

Parameter NameNameRequiredTypeExample
X-operating-sys-versionCaller client operating system versionYesStringwindows10.1.1
X-device-fingerprintCaller client device fingerprintYesString156aysdna213sc50
X-device-ipCaller client IPNoString192.168.1.2
X-agentUser-Agent informationYesStringMozilla/5.0 (iPhone; CPU iPhone OS 13_3 like Mac OS X)
X-LUsed for internationalization language settingNoStringzh
X-client-idApplication authorization IDYesStringnTo1eRIub60vPb54WeE6aojPwYwImtl4
AuthorizationAuthorization informationYesStringBearer {id_token}
content-typeContent format typeYesStringapplication/json

Request Example

json
{
    "old_password": "aaaaaa",
    "new_password": "bbbbbb"
}

Request Parameters

Parameter NameNameRequiredTypeDescription
old_passwordOriginal passwordNoStringThe user's old password; it can be omitted if the user has not set an old password
new_passwordNew passwordYesStringThe new password to be set

Response Example

Success Example

HTTP/1.1 200 OK

Error Example

HTTP/1.1 400 Bad Request

json
{
    "error_code": "IDAAS.SDK.PARAM.0016",
    "error_msg": "IdToken is invalid or expired"
}

Response Parameters

None

Error Codes

Status CodeError CodeChinese Error MessageEnglish Error MessageResolution
400IDAAS.SDK.PARAM.0001设备信息不完整Device information is incompletePlease check whether the input device information is complete
400IDAAS.SDK.PARAM.0002clientId不能为空clientId cannot be emptyPlease check whether the input clientId is empty
400IDAAS.SDK.PARAM.0003应用未注册,请先注册应用The app is not registered, please register the app firstPlease check whether the input clientId is correct
400IDAAS.SDK.PARAM.0015IdToken不能为空IdToken cannot be emptyPlease check whether the input IdToken is empty
400IDAAS.SDK.PARAM.0016IdToken无效或已过期IdToken is invalid or expiredPlease re-acquire the IdToken and try again
400IDAAS.SDK.PARAM.0018原密码不能为空Original password cannot be emptyPlease check whether the input original password is empty
400IDAAS.SDK.PARAM.0019新密码不能为空New password cannot be emptyPlease check whether the input new password is empty
400IDAAS.SDK.PARAM.0020原密码和新密码不能一致The original password and the new password do not matchPlease check whether the original password and new password are consistent
400IDAAS.SDK.PWD.0001不允许使用历史密码The password is used before, cannot be used againPlease re-enter the password
400IDAAS.SDK.PWD.0002密码不允许使用用户名的倒写Password cannot username in reverse orderPlease re-enter the password
400IDAAS.SDK.PWD.0003密码中不允许包含:用户名、手机号、邮箱前缀、姓名拼音Password cannot contain :username, phone number, email prefix, name in PinYingPlease re-enter the password
400IDAAS.SDK.PWD.0004密码复杂度低,Your password complexity is low,Please re-enter the password
400IDAAS.SDK.PWD.0005该密码为弱密码The password is weakPlease re-enter the password
400IDAAS.SDK.PWD.0006密码中最大字符重复数不能超过Number of character repeat in password should not exceedPlease re-enter the password
400IDAAS.SDK.PWD.0007密码长度为{0}~{1}个字符The password must contain {0} to {1} charactersPlease re-enter the password

BambooCloud IDaaS Open Platform