Link Search Menu Expand Document

Confirm

/api/v2/user/confirm/${username}/${password}

Get

users

profiles

groups

rooms


Purpose

To allow a registered user to confirm his / her email address.

URL Parameters [input]

{
    username: string,
    token: string
}

Returns if valid [output]

{
    message: string,
    error: 0
}

What the API does

  • Fetches the username and token from the URL as parameters.
  • Checks if there is a record in the users collection with the username supplied [404].
  • Checks if the token supplied is valid and corresponds to the one saved in the fetched record [401].
  • Finds the konnect group and creates a new record for that user in in its members field if that’s not already the case and adds a new group_invite with a state of accepted in the profile of the user.
  • Finds the konnect room and creates a new record for that user in in its members field if that’s not already the case and adds a new chat_invite with a state of accepted in the profile of the user.
  • Sets the active field of the users collection concerned to true and its prev_email value to that of its email.