Account

Register

Type: POST
Route: /register
1
2

Body

{
	"email": "[email protected]",
	"username": "TestUser",
	"password": "superSecurePassword"
}
1
2
3
4
5

Response 200

{ "message": "You have successfully created a new account." }
1

Possible errors

# Code 400
{ "message": "Invalid e-mail address provided." }
{ "message": "An account with that email address and/or username already exists." }
1
2
3

Login

Type: POST
Route: /login
1
2

Body

{
	"username": "TestUser",
	"password": "superSecurePassword"
}
# or
{
	"username": "[email protected]",
	"password": "superSecurePassword"
}
1
2
3
4
5
6
7
8
9

Response 200

{
	"message": "Successfully logged in.",
	"token": "JWT",
	"apiKey": "your-api-key" #Only if requested via developer access
}
# or
{
	"message": "Please provide the 2FA code to log in.",
	"mfa": true,
	"token": "JWT" #This token is only valid for ~2m from this point on
}
1
2
3
4
5
6
7
8
9
10
11

Possible errors

# Code 400
{ "message": "No body provided." }
{ "message": "Invalid body provided." }

# Code 401
{ "message": "Invalid authorization." }

# Code 403
{ "message": "This account has been deactivated." }
1
2
3
4
5
6
7
8
9

Login 2FA

Type: POST
Route: /login/mfa
1
2

Additional headers

Authorization: Bearer Temp2FAJWT
1

Body

{
	"token": "OPTCode"
}
1
2
3

Response 200

{
	"message": "Successfully logged in.",
	"token": "mfa.JWT",
	"apiKey": "your-api-key" # Only if requested via developer access
}
1
2
3
4
5

Possible errors

# Code 400
{ "message": "No body provided." }
{ "message": "Invalid body provided." }

# Code 401
{ "message": "Invalid authorization." }

# Code 403
{ "message": "This account has been disabled." }
1
2
3
4
5
6
7
8
9
Last Updated: 6/21/2018, 12:22:34 PM