<aside>
💡 **baseURL = <http://localhost>:<SERVER_PORT>** [<https://vooler.biz>](<https://www.vooler.biz/>) (available until 30 Dec 2022)
</aside>
<aside> ‼️ UserID and password need to be hashed in frontend and transfer to backend as hashed data (ref this material)
</aside>
{
"userId": "HashedUserID_FromFrontEnd",
"password": "HashedPassword_FromFrontEnd",
"teamId": 1 //Could be omitted
}
201 Created with empty data if the user is added successfully
403 Forbidden if username was taken, error message:{ "error": "UserID is taken"}
{ error: "cannot register new user" }
{
"userId": "HashedUserID_FromFrontEnd",
"password": "1234"
}
{
"user": {
"user_id": "HashedUserID_FromFrontEnd",
"team_id": 2
},
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjoiSGFzaGVkVXNlcklEX0Zyb21Gcm9udEVuZCIsInRlYW1faWQiOjIsImlhdCI6MTY2ODI4NjIyMX0.YAnHgWbcVBXbOR6tDcgB1QX0CXhF-o2qP-RY_vq0g24"
}
401 Unauthorized , error message Invalid login credentials404 Not Found , error message userId not found