POST
/reset_user_password
application/json
POST /reset_user_password HTTP/1.1Content-Type: application/jsonAuthorization: Basic VEVOQU5UX0NMSUVOVF9JRDpURU5BTlRfQ0xJRU5UX1NFQ1JFVA==Host: sample.portal.tencentciam.com{"password" : "MOCK_PASSWORD","email" : "MOCK_EMAIL@163.com","email_otp" : "MOCK_EMAIL_OTP","email_otp_token" : "MOCK_EMAIL_OTP_TOKEN"}
Name | Description |
Authorization | HTTP Basic authentication request header. The format is Basic <credentials> , where `Basic` is a fixed string and <credentials> is calculated by base64(url_encode(client_id) + ":" + url_encode(client_secret)) . `Basic` and <credentials> are separated by a space. |
JSON Path | Data Type | Description |
client_id | String | The client_id of the application. This should be the same as that used for sending verification code. |
client_secret | String | The client_secret of the application. This parameter is required for web applications, yet it is not needed for SPA and mobile applications. |
password | String | New password. |
email | String | The user's email address. This parameter is required for sending email OTP verification code. |
email_otp_token | String | The otp_token returned by the server after the email verification code is sent. |
email_otp | String | The OTP verification code received by the user's email. |
phone_number | String | The user's mobile number. This parameter is required for sending SMS OTP verification code. |
phone_number_otp_token | String | The otp_token returned by the server after the SMS verification code is sent. |
phone_number_otp | String | The OTP verification code received by the user's mobile phone. |
HTTP/1.1 200 OK
HTTP/1.1 400 Bad RequestContent-Type: application/json;charset=UTF-8{"error" : "recurrent_password"}
HTTP/1.1 400 Bad RequestContent-Type: application/json;charset=UTF-8{"error" : "invalid_new_password"}
HTTP/1.1 400 Bad RequestContent-Type: application/json;charset=UTF-8{"error" : "user_not_found"}
HTTP/1.1 400 Bad RequestContent-Type: application/json;charset=UTF-8{"error" : "abnormal_user_status","error_description" : "User is frozen."}
email_otp_token
parameter is incorrect or has expired, or Reset parameter value used for resetting is not the same as the one used for sending the verification code. For example, the email addresses are different.HTTP/1.1 400 Bad RequestContent-Type: application/json;charset=UTF-8{"error" : "bad_email_otp_token"}
email_otp
parameter is incorrect or has expired.HTTP/1.1 400 Bad RequestContent-Type: application/json;charset=UTF-8{"error" : "bad_email_otp"}
Was this page helpful?