Signup

POST /signup: Signs up the user provided a unique username, email and password
{
"Username": string,
"Password": string,
"Email": string
}

Example Request

Body

{
"Username": "Chris",
"Email": "hello@2ofClubs.app",
"Password": "password"
}

Parameters


Username (Required, Unique)

Usernames must start with a letter and can only contain the following characters: a-zA-Z0-9_ and must be 50 characters or less

Note: If the username is valid, it will be lowercased

Min: 2 characters
Max: 15 characters


Email (Required, Unique)

Emails must be valid (i.e. Must include @ and a valid TLD)


Password (Required)

Min: 3 characters
Max: 45 characters (See note below)

Note: Since bcrypt is used to hash the passwords, there is a 50 character string length limitation.


Possible Responses

Immediate Success

{
"code": 1,
"message": "signup successful",
"data": {}
}

Failure

{
"code": -1,
"message": "unable to sign up user",
"data": {
"username": "username already exists",
"email": "email already exists",
"password": ""
}
}
{
"code": -1,
"message": "unable to sign up user",
"data": {
"username": "username must start with a letter and can only contain the following characters: a-zA-Z0-9_ and must be 50 characters or less",
"email": "must be a valid email",
"password": "a password is required"
}
}
Last updated on by Chris Lim