login
POST /auth/login/
Description
This endpoint is used to fetch or generate a token for a user, using a 6 digit pin that is generated when authenticating with discord here.
The 6 digit pin is only valid for 10 minutes after being generated.
Body
The body of the request should be JSON, and should contain the following:
Variable | Description |
---|---|
code | The 6 digit pin generated when authenticating with discord |
Example
{
"code": "669496"
}
Response
{
"username": "Users_Username",
"authToken": "Users_Auth_Token",
"premium": 3,
"usernameColor": "#ff0000"
}
OR
{
"username": "Users_Username",
"authToken": "Users_Auth_Token",
"premium": 0
}
If the user does not have premium, the usernameColor is not sent