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 
usernameandtokenfrom the URL as parameters. - Checks if there is a record in the 
userscollection with theusernamesupplied [404]. - Checks if the 
tokensupplied is valid and corresponds to the one saved in the fetched record [401]. - Finds the 
konnectgroup and creates a new record for that user in in itsmembersfield if that’s not already the case and adds a newgroup_invitewith a state ofacceptedin theprofileof the user. - Finds the 
konnectroom and creates a new record for that user in in itsmembersfield if that’s not already the case and adds a newchat_invitewith a state ofacceptedin theprofileof the user. - Sets the 
activefield of theuserscollection concerned totrueand itsprev_emailvalue to that of itsemail.