Skip to content

Register a new user

post/api/user/register
Register a new user.

Request

Body application/json

usernamestring
The username.
passwordstring
The password, encrypted with SHA256 and converted to lower case.
passwordConfirmstring
The confirm password.

Response

Schema: application/json
codestring
dataundefined
messagestring

Body application/json

json
// SUCCESS

{
  "code": "0",
  "message": "Ok"
}
// SUCCESS

{
  "code": "0",
  "message": "Ok"
}
json
// USER_ALREADY_EXISTS

{
  "code": "102",
  "message": "User already exists"
}
// USER_ALREADY_EXISTS

{
  "code": "102",
  "message": "User already exists"
}
json
// USER_PASSWORD_NOT_SAME_TWICE

{
  "code": "104",
  "message": "User passwords are not the same twice"
}
// USER_PASSWORD_NOT_SAME_TWICE

{
  "code": "104",
  "message": "User passwords are not the same twice"
}
json
// USER_CREATE_FAILED

{
  "code": "105",
  "message": "User registration failed"
}
// USER_CREATE_FAILED

{
  "code": "105",
  "message": "User registration failed"
}