Skip to content

Force Change Password When Password Expired

When calling the username/password login API, if the password has expired or is about to expire, and the user chooses to change the password, call this API.

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
X-state-tokenTemporary tokenYesStringeyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWJqZWN0Ijoie1............................
content-typeContent format typeYesStringapplication/json

Request Example

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

Request Parameters

Parameter NameNameRequiredTypeDescription
old_passwordOriginal passwordYesStringThe user's old password
new_passwordNew passwordYesStringThe new password to be set

Response Example

Success example:
HTTP/1.1 200 OK
Content-Type: application/json
{
    "status": "SUCCESS",
    "expire": 43200,
    "session_token": "LGTiTNVDFPlpefV3F3Hla7RUFTqInsqa",
    "id_token": "eyJ0NiJ9.eyJ1cI6IjIifX0.DeWt4QuZXso"
}


Error example:
HTTP/1.1 400 Bad Request
{
    "error_code": "IDAAS.SDK.PARAM.0014",
    "error_msg": "Invalid state token"
}

Response Parameters

Parameter NameNameTypeDescription
statusReturn resultStringPossible values are as follows: SUCCESS login successful; ACCESS_DENIED access denied
expiresession_token validity periodNumbersession_token validity period; within the validity period, session_token can be used to obtain ticket
session_tokenUser session_tokenStringUser session_token; this token can be used to call IDaaS APIs to obtain sso_ticket, and sso_ticket can be exchanged for user information
id_tokenShort-term valid interface call tokenStringThis field is in JWT format and contains user identity information. For details, see Get User Info from id_token. The token validity period defaults to 5 minutes and is configurable.

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.0013临时令牌不能为空State token cannot be emptyPlease check whether the input temporary token is empty
400IDAAS.SDK.PARAM.0014临时令牌无效Invalid state tokenPlease check whether the input temporary token is correct
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.LOGIN.0001由于多次登录失败,用户已被锁定。 它将在 {0} 分钟和 {1} 秒内解锁User has been locked out due to multiple login failures. It will be unlocked in {0} minutes and {1} secondsPlease try again after unlocking
400IDAAS.SDK.LOGIN.0002无效的账号或密码。 剩余次数:Invalid account or password. Remaining times:Please check whether the input username or password is correct
400IDAAS.SDK.USER.0039用户已被禁用User is disabledPlease contact the administrator
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