Skip to content

Force Password Update When Expired API

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 NameNameRequiredTypeDescription
X-operating-sys-versionCaller operating system versionYesStringwindows10.1.1
X-device-fingerprintCaller device fingerprintYesString156aysdna213sc50
X-device-ipCaller IPNoString192.168.1.2
X-agentUser-Agent informationYesStringMozilla/5.0 (iPhone; CPU iPhone OS 13_3 like Mac OS X) AppleWebKit/605.1.15(KHTML, like Gecko) Mobile/15E148/HuaWei-AnyOffice/2.6.1802.0010/com.huawei.cloudlink.workplace
X-LUsed for internationalization language settingNoStringzh
X-client-idApplication authorization IDYesStringnTo1eRIub60vPb54WeE6aojPwYwImtl4
X-state-tokenTemporary tokenYesStringeyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWJqZW1...

Request Example

json
{
    "old_password": "P@ssw0rd",
    "new_password": "P@ssw0rd123"
}

Request Parameters

Parameter NameNameRequiredTypeDescription
old_passwordOld passwordYesStringUser's old password
new_passwordNew passwordYesStringNew password to set

Response Example

Error Example

HTTP/1.1 400 Bad Request

json
{
    "error_code": "SDK.COMMON.1001",
    "error_msg": "Parameter X-client-id cannot be left blank."
}

Response Parameters

Parameter NameNameTypeDescription
statusReturn resultStringPossible values for this field
  • SUCCESS = Login successful
  • MFA_AUTH = Secondary authentication
  • ACCESS_DENIED = Access denied
  • expiresession_token validity periodNumberValidity period of session_token; within this period, session_token can be used to obtain a ticket
    session_tokenUser session_tokenStringUser session_token; this token can be used to call BambooCloud IDaaS APIs to obtain a sso_ticket, which can be exchanged for user information
    state_tokenUser state tokenStringToken carrying user state
    dataResponse descriptionStringResponse description
  • status = MFA_AUTH, returns secondary authentication methods
  • status = ACCESS_DENIED, returns access denied
  • id_tokenShort-term valid interface call credentialStringThis field is a JWT containing user information and the application's scope information; it must be verified and parsed. Default validity is 2 hours and is configurable

    BambooCloud IDaaS Open Platform