/change-password

✅ Email as user_id

These are the possible response codes when you make an API call to the /change-password endpoint with an email address as user_id.

Response code

Error

Message

Scenario

Resolution

getaddrinfo ENOTFOUND

"Could not send request"

Invalid Environment name in URL

200 OK

Change password successfully

200 OK

Invalid grant_type

200 OK

Null grant_type value

200 OK

Remove grant_type parameter

200 OK

Invalid redirect_uri value

200 OK

Null redirect_uri

200 OK

Removed redirect_uri

200 OK

Enter valid current_password

200 OK

Removed current_password parameter

200 OK

Null locale value

200 OK

Remove locale value

400 Bad Request

http_exception

"Invalid json format"

Empty payload

Add the payload.

400 Bad Request

invalid_parameters

"Invalid json format"

Invalid JSON format used in the payload.

Use correct JSON format for the payload.

400 Bad Request

invalid_domain

"Invalid API usage"

Invalid environment ID value

Enter a valid environment ID value.

401 Unauthorized

http_exception

"Unauthorized"

Incorrect password and password_confirm

Enter the same password and password_confirm values.

403 Forbidden

http_exception

"Forbidden"

Invalid client_id

Enter a valid client_id value.

422 Unprocessable Entity

invalid_parameters

"client_id": {
"missing": "required"
}

no error description

Missing value in client_id

Enter a valid client_id value.

422 Unprocessable Entity

invalid_parameters

"client_id": "field required"

Removed client_id parameter

Add the client_id parameter and value.

422 Unprocessable Entity

invalid_parameters

"message": "Passwords do not match"

no error description

Mismatched password entered for password and password_confirm

Enter the same password and password_confirm values.

422 Unprocessable Entity

invalid_parameters

"message": "Current password is incorrect. Please try again."

no error description

Incorrect/Invalid current_password

Enter the correct password.

422 Unprocessable Entity

invalid_form_fields

"message": "Password is not formatted correctly."

"error_description": "some inputs are invalid"

Validate password requirement (Either enter numbers or letters only)

Enter a valid and properly formatted password value.

422 Unprocessable Entity

invalid_parameters

"password": "field required"

Removed password parameter

Add the password parameter and value.

422 Unprocessable Entity

invalid_parameters

"message": "Passwords do not match"

no error description

Missing password field

Enter a valid password value.

422 Unprocessable Entity

invalid_parameters

"password_confirm": "field required"

Remove password_confirm parameter

Add the password_confirm parameter and value.

422 Unprocessable Entity

invalid_parameters

"auth_type": {
"invalid": "unsupported auth_type value"
}

no error description

Invalid auth_type value

Enter a valid auth_type value

422 Unprocessable Entity

invalid_parameters

"auth_type": {
"invalid": "unsupported auth_type value"
}

no error description

Missing auth_type value

Enter a valid auth_type value.

422 Unprocessable Entity

invalid_parameters

"auth_type": "field required"

Removed auth_type parameter

Add the auth_type parameter and value.

422 Unprocessable Entity

invalid_parameters

"user_id": {
"invalid": "invalid format"
}

no error description

Missing user_id value

Enter a valid user_id value.

422 Unprocessable Entity

invalid_parameters

"user_id": {
"invalid": "invalid format"
}

no error description

Incorrect user_id

Enter a valid user_id value.

422 Unprocessable Entity

invalid_parameters

"user_id": "field required"

Remove user_id parameter

Add the user_id parameter and value.

422 Unprocessable Entity

unexpected_error

"error_details": null,
"error_description": "could not find a flow named 'standard_global' with version '20220207155201304965' and locale 'xxxx' "

Invalid locale value

Enter a valid locale value

503 Service Temporarily Unavailable

"Backend action does not exist"

Invalid version code

Enter a valid version value.

✅ Mobile phone number as user_id

These are the possible response codes when you make an API call to the /change-password endpoint with a mobile phone number as user_id.

Response code

Error

Message

Scenario

Resolution

200 OK

Null value for locale

200 OK

Removed locale

200 OK

Change password successfully using SMS

200 OK

Invalid grant_type value

200 OK

Null grant_type value

200 OK

Remove grant_type parameter

200 OK

Invalid redirect_uri

200 OK

Null redirect_uri value

200 OK

Removed current_password

400 Bad Request

invalid_domain

"Invalid API usage"

Invalid environment name in URL

Enter a valid environment name in the URL.

401 Unauthorized

http_exception

"Unauthorized"

Invalid password field

Enter a valid password value.

403 Forbidden

"http_exception"

"Forbidden"

Invalid client_id value

Enter a valid client_id value.

422 Unprocessable Entity

invalid_parameters

"client_id":{
"missing": "required"
}

no error description

Missing client_id value

Enter a valid client_id value.

422 Unprocessable Entity

invalid_parameters

"client_id": "field required"

Removed client_id parameter

Add the client_id parameter and value.

422 Unprocessable Entity

invalid_parameters

"error_details": {
"message": "Passwords do not match"
}

no error description

Mismatched password for password and password_confirm

Enter the same password and password_confirm values.

422 Unprocessable Entity

invalid_parameters

"error_details": {
"message": "Passwords do not match"
}

no error description

Incorrect password and password_confirm

Enter the same password and password_confirm values.

422 Unprocessable Entity

invalid_form_fields

"error_details": {
"message": "Password is not formatted correctly."
},
"error_description": "some inputs are invalid"

Invalid password value

Enter a valid and properly formatted password value.

422 Unprocessable Entity

invalid_parameters

"password": "field required"

Removed password parameter

Add the password parameter and value.

422 Unprocessable Entity

invalid_parameters

"message": "Passwords do not match"

no error description

Missing password value

Add a valid password value.

422 Unprocessable Entity

invalid_parameters

"password_confirm": "field required"

Removed password_confirm parameter

Add the password_confirm parameter and value.

422 Unprocessable Entity

invalid_parameters

"auth_type": {
"invalild": "unsupported auth_type value"
}

no error description

Invalid auth_type

Enter a valid auth_type value.

422 Unprocessable Entity

invalid_parameters

"auth_type": {
"invalild": "unsupported auth_type value"
}

no error description

Missing auth_type value

Enter a valid auth_type value.

422 Unprocessable Entity

invalid_parameters

"auth_type": "field required"

Removed auth_type parameter

Add the auth_type parameter and value.

422 Unprocessable Entity

invalid_parameters

"user_id": {
"invalid": "invalid format"
}

no error description

Incorrect user_id value

Enter a valid user_id value

422 Unprocessable Entity

invalid_parameters

"user_id": {
"invalid": "invalid format"
}

no error description

Missing user_id value

Enter a valid user_id value

422 Unprocessable Entity

invalid_parameters

"user_id": "field required"

Removed user_id parameter

Add the user_id parameter and value.

422 Unprocessable Entity

unexpected_error

Example:

"error_details": null,
"error_description": "could not find a flow named 'xxxxxxxxxxxxxxxxxxxxxxxx" with version 'xxxxxxxxxxxxxxxxxxxx" and locale 'xx-xx'

Invalid locale value

Enter a valid locale value

503 Service Temporarily Unavailable

"Backend action does not exist"

Invalid version code in URL

Enter the correct version value.