Link Search Menu Expand Document

Reset

/api/v2/user/reset

Post

users


Purpose

To allow a registered user to reset his / her password.

Body Content [input]

{
    auth_data: string
}

Returns if valid [output]

{
    message: string,
    error: 0
}

What the API does

  • Checks if there is a record in the users collection with the value of the auth_data field supplied [404].
  • Checks if the record from the users collection has an activated account using the active field [401].
  • Checks if the value of the reset bool of the found user is not already true [400].
  • Sends a mail to the email address corresponding to the value of the prev_email field with the following link: https://api.konnect.dev/api/v2/user/password/reset/${username}/${token}
  • Sets the value of the reset bool to true and that of the email field to that of the prev_email and saves the record.