Request Reset Password

Location /api/apps/{appID}/users/me/password/request-reset
This resource allows to do a request to reset the password of the user using the email or the phone number of the user as notification method for the process.

Request Headers (Applies to all methods)

Authorization
header
Required: Yes

POST

/api/apps/{appID}/users/me/password/request-reset

Description

Send an email with a link for resetting the password to the user.

Note

This request requires empty body.

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
Responses
204

Content-Type (None)

The email has been sent successfully.
Note This response has no contents.
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.
409

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

The user did not have a password.
Contents
Name Type Description
errorCode string Error code "OPERATION_NOT_ALLOWED".
message string The error message.
409

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

The user did not have a verified email address.
Contents
Name Type Description
errorCode string Error code "INVALID_STATUS".
message string The error message.
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.

POST

/api/apps/{appID}/users/me/password/request-reset

Description

Send an email with a link for resetting the password of the user, or send a SMS with a link or PIN code for resetting the password to the user.

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

The chosen notification method to perform the 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
notificationMethod Yes string The method for notifying the user. You can specify "EMAIL" or "SMS".
smsResetMethod string The mode in which SMS sent to the user will contain reset method: PIN code ("PIN") or URL link ("URL").
Sample Request
{
  "notificationMethod": "[string]",
  "smsResetMethod": "[string]"
}
Responses
204

Content-Type (None)

The email or SMS has been sent successfully.
Note This response has no contents.
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.
409

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

The user did not have a password.
Contents
Name Type Description
errorCode string Error code "OPERATION_NOT_ALLOWED".
message string The error message.
409

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

The user did not have a verified email address when the notification method "EMAIL" is selected, or the user did not have a verified phone number when the notification method "SMS" is selected.
Contents
Name Type Description
errorCode string Error code "INVALID_STATUS".
message string The error message.
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.