Complete password reset

Location /api/apps/{appID}/users/{accountType}:{address}/password/complete-reset
This resource completes the password reset process by sending a PIN code and the user's new password.

Request Headers (Applies to all methods)

Authorization
header
Required: Yes

POST

/api/apps/{appID}/users/{accountType}:{address}/password/complete-reset

Description

Complete the password reset process.

Content-Type application/vnd.kii.CompletePasswordResetRequest+json

The data for completing the user password reset.

Headers
Name Required? type Description
Authorization Yes string Authorization can be of type Basic or Bearer.
  • Authorization Basic: header for granting an anonymous access.
    • Set a Base64-encoded string of AppID and AppKey concatenated with a colon (APP_ID:APP_KEY).
    • The header should look like:
      Authorization: Basic czZCaGRSa3F0Mzo3RmpmcDBaQnIxS3REUmJuZlZkbUl3
  • Authorization Bearer: using Oauth2 Bearer Token.
    • The header should look like:
      Authorization: Bearer ht5fpHQAyrPPwLftK1rAqllv5WNVPCnYfPiCvPocFuQ
Params
Name Required? Type Description
newPassword Yes string The new password of the user. The length must be between 4 and 50 characters and must follow the next pattern: \p{Print} (onlyprintable characters).
pinCode Yes string The PIN code for resetting the password. The PIN code is sent via a SMS.
Sample Request
{
  "newPassword": "[string]",
  "pinCode": "[string]"
}
Responses
204

Content-Type (None)

The user password has been reset successfully.
Note This response has no contents.
400

Content-Type application/vnd.kii.ValidationException+json

The PIN code was not sent or is empty.
Contents
Name Type Description
errorCode string Error code "INVALID_INPUT_DATA".
message string The error message.
400

Content-Type application/vnd.kii.ValidationException+json

The new password is the same than old password.
Contents
Name Type Description
errorCode string Error code "INVALID_INPUT_DATA".
message string The error message.
400

Content-Type application/vnd.kii.PasswordTooShortException+json

The new password is too short.
Contents
Name Type Description
message string The error message.
errorCode string Error code "PASSWORD_TOO_SHORT".
minimumLength int The minimum length accepted.
409

Content-Type application/vnd.kii.InvalidVerificationCodeException+json

The PIN code was invalid.
Contents
Name Type Description
errorCode string Error code "INVALID_VERIFICATION_CODE".
message string The error message.
userID string The ID of the user.
appID string The ID of the application.
verificationCode string The verification code.
410

Content-Type application/vnd.kii.PINCodeExpiredException+json

The PIN code expired.
Contents
Name Type Description
errorCode string Error code "PIN_CODE_EXPIRED".
message string The error message.
appID string The ID of the application.
thingID string The ID of the thing.
userID string The ID of the user.
404

Content-Type application/vnd.kii.UserNotFoundException+json

The user was not found.
Contents
Name Type Description
errorCode string Error code "USER_NOT_FOUND".
message string The error message.
field string The field used for searching the user. This can be the userID or address field.
value string The field value used for searching the user.
appID string The ID of the application.
401

Content-Type application/vnd.kii.UserDisabledException+json

The user was disabled.
Contents
Name Type Description
errorCode string Error code "USER_DISABLED".
message string The error message.
UserID string The ID of the user.
appID string The ID of the application.