Customer Identity (CIAM)
Forgot Password via Email
When a user clicks "Forgot Password" on the login page and chooses to recover via email, they need to enter their email, verification code, and a new password. After passing the graphical captcha verification, this interface is called. After a successful call, the user should return to the login page to log in again.
# Request Description
POST https://{your_domain}/api/v2/sdk/pwd/update-by-email
# Request Headers
| Parameter Name | Chinese Name | Required | Type | Example |
|---|---|---|---|---|
| X-operating-sys-version | Calling Party OS Version | Yes | String | windows10.1.1 |
| X-device-fingerprint | Calling Party Device Fingerprint | Yes | String | 156aysdna213sc50 |
| X-device-ip | Calling Party IP | No | String | 192.168.1.2 |
| X-agent | User-Agent Information | Yes | String | Mozilla/5.0 (iPhone; CPU iPhone OS 13_3 like Mac OS X) |
| X-L | For Internationalization Language Setting | No | String | zh |
| X-client-id | Application Authorization ID | Yes | String | nTo1eRIub60vPb54WeE6aojPwYwImtl4 |
| content-type | Content Format Type | Yes | String | application/json |
# Request Example
{
"email": "15200000000@qq.com",
"verify_code": "123456",
"password": "P@sdsdfsdfds"
}
1
2
3
4
5
2
3
4
5
# Request Parameters
| Parameter Name | Chinese Name | Required | Type | Description |
|---|---|---|---|---|
| Yes | String | |||
| verify_code | Email Verification Code | Yes | String | Email verification code To obtain the verification code, please refer to the Send Email Verification Code API type=FORGET_PWD_EMS |
| password | New Password | Yes | String | The new password to set |
# Response Example
Success Example:
HTTP/1.1 200 OK
Content-Type: application/json
Error Example:
HTTP/1.1 400 Bad Request
{
"error_code": "IDAAS.SDK.CAPTCHA.0007",
"error_msg": "Incorrect verification code"
}
1
2
3
4
5
6
7
8
9
10
11
2
3
4
5
6
7
8
9
10
11
# Return Parameters
None
# Error Codes
| Status Code | Error Code | Error Message | Handling Measures |
|---|---|---|---|
| 400 | IDAAS.SDK.PARAM.0001 | Device information is incomplete | Please check if the input device information is complete |
| Device information is incomplete | |||
| 400 | IDAAS.SDK.PARAM.0002 | clientId cannot be empty | Please check if the input clientId is empty |
| clientId cannot be empty | |||
| 400 | IDAAS.SDK.PARAM.0003 | The app is not registered, please register the app first | Please check if the input clientId is correct |
| The app is not registered, please register the app first | |||
| 400 | IDAAS.SDK.PARAM.0009 | Verification code cannot be empty | Please check if the input verification code is empty |
| Verification code cannot be empty | |||
| 400 | IDAAS.SDK.CAPTCHA.0007 | Incorrect verification code | Please check if the input verification code is correct |
| Incorrect verification code | |||
| 400 | IDAAS.SDK.USER.0005 | E-mail cannot be empty | Please check if the email field in the input parameters is empty |
| Email cannot be empty | |||
| 400 | IDAAS.SDK.USER.0006 | Password cannot be empty | Please check if the input password is empty |
| Password cannot be empty | |||
| 400 | IDAAS.SDK.USER.0001 | User not found | Please try again after registration |
| User not found | |||
| 400 | IDAAS.SDK.PWD.0001 | The password is used before, cannot be used again | Please re-enter the password |
| Historical passwords are not allowed | |||
| 400 | IDAAS.SDK.PWD.0002 | Password cannot username in reverse order | Please re-enter the password |
| Passwords are not allowed to be the reverse spelling of the username | |||
| 400 | IDAAS.SDK.PWD.0003 | Password cannot contain :username, phone number, email prefix, name in PinYing | Please re-enter the password |
| Password must not contain: username, phone number, email prefix, name in Pinyin | |||
| 400 | IDAAS.SDK.PWD.0004 | Your password complexity is low, {0} | Please re-enter the password |
| Password complexity is low, {0} | |||
| 400 | IDAAS.SDK.PWD.0005 | The password is weak | Please re-enter the password |
| This password is weak | |||
| 400 | IDAAS.SDK.PWD.0006 | Number of character repeat in password should not exceed {0} | Please re-enter the password |
| The maximum number of character repetitions in the password must not exceed {0} | |||
| 400 | IDAAS.SDK.PWD.0007 | The password must contain {0} to {1} characters | Please re-enter the password |
| Password length is {0}~{1} characters |
Please provide the Markdown content you would like me to translate.
