{
username: string;
password: string;
}
- ✅ Status: 200
auth: true,
error: false,
message: "Logged In",
cookies: {
token: JWT
}
- ❌ Status: 401
auth: false,
error: false,
message: "Invalid data",
headers: {
Authorization: JWT;
}
- ✅ Status: 202
auth: true,
error: false,
message: "Authenticated"
- ❌ Status: 403
auth: false,
error: false,
message: "Not authorized"
headers: {
Authorization: JWT
},
- ✅ Status: 200
auth: true,
error: false,
message: "User fetched",
data: {
username: string,
uid: string,
avatar: string,
bio: string,
uploads: string // upload counter—the user can toggle this in settings
}
-
❌ Status: 401, 404
- 401 when not authorized
- 404 when the user doesn't exist
headers: {
Authorization: JWT
},
file: formFile
-
✅ Status: 200
-
❌ Status: 401, 404
- 401 when not authorized
- 404 when the user doesn't exist
headers: {
Authorization: JWT
},
-
✅ Status: 200
-
❌ Status: 401, 501
- 501 when the invite system is disabled
- 401 when the user is unauthorized
body: {
username: string,
email: string,
password: string,
invite: string
}
If the invite system is disabled, we just ignore the invite
-
✅ Status: 200
-
❌ Status: 400
headers: {
Authorization: JWT
},
username: string
-
✅ Status: 200
-
❌ Status: 401, 501
- 501 when the invite system is disabled
- 401 when the user is unauthorized
- 404 when the user doesn't exist
headers: {
Authorization: JWT
},
username: string
reason: string
-
✅ Status: 200
-
❌ Status: 401, 404
- 401 when the user is unauthorized
- 404 when the user doesn't exist
headers: {
Authorization: JWT
},
username: string
-
✅ Status: 200
-
❌ Status: 401, 404
- 401 when the user is unauthorized
- 404 when the user doesn't exist