Account
POST /api/auth/signup
Sign up for a new account.
Authorization: None
Content type: application/json
Request body schema
Key | Type | Description |
---|---|---|
string | The email of the account | |
nickName | string | The nickname of the account |
gamePlayerName | string | The username used by the account in Minecraft |
password | string | The password of the account |
Response
Content type: application/json
201
The user has been created without errors.
400
Failed to create the account.
POST /api/auth/signin
Sign in to an existing account.
Authorization: None
Content type: application/json
Request body schema
Key | Type | Description |
---|---|---|
gamePlayerName | string | The username used by the account in Minecraft |
password | string | The password of the account |
Response
Content type: application/json
- Success (200)
- Fail (401)
Successfully validate the password, and a JWT token will be returned.
Status code: 200
Cookies:
authToken
: A JWT token issued by the server.
Body:
Key | Type | Description |
---|---|---|
token | string | The JWT token mentioned above |
Failed to sign in, see the error reason.
Status code: 401
Body:
Key | Type | Description |
---|---|---|
reason | string | The reason why failed to process sign-in request |