User endpoints
info
these are endpoints relating to users
Getting user info
GET
/users/:user_key
Parameters
| Name | Type | Description |
|---|---|---|
| user_key | String | The users key |
Response
- Success
{
"success": true,
"user": {
"key": "USER_KEY",
"discord_id": "DISCORD_ID",
"fingerprint_assigned": true,
"executor": "EXECUTOR",
"executions": 0,
"key_expires": 1770624500000,
"last_reset": 1770538100000,
"total_fingerprint_resets": 0,
"note": "NOTE",
"blacklisted": false,
"blacklist_reason": null,
"blacklist_expires": null,
"luaauth_fingerprint": "⬛⬛⬛⬛⬛⬛ -> ip\n⬛⬛⬛⬛⬛⬛ -> fingerprint\n⬛⬛⬛⬛⬛⬛ -> executor"
}
}
Editing a user
POST
/users/:user_key/edit
Parameters
| Name | Type | Description |
|---|---|---|
| user_key | String | The users key |
Body
| Name | Type | Nullable | Description |
|---|---|---|---|
| discord_id | String | ✅ | users discord id |
| key_expires | Number | ✅ | Unix ms timestamp for users key to expire |
| note | String | ✅ | Note for user |
Response
- Success
- Error
{ "success": true }
| Code | Message |
|---|---|
| 0 | account expired |
| 1 | key already exists with this discord |
| 2 | cannot edit nothing |
Blacklisting a user
POST
/users/:user_key/blacklist
Parameters
| Name | Type | Description |
|---|---|---|
| user_key | String | The users key |
Body
| Name | Type | Nullable | Default | Description | |-|-|-|-| | expires | String | ✅ | Null | Unix ms timestamp for when blacklist expires | | reason | Number | ✅ | Null | Reason for blacklisting user |
Response
- Success
- Error
{ "success": true }
| Code | Message |
|---|---|
| 0 | user already blacklisted |
| 1 | account expired |
Unblacklisting a user
POST
/users/:user_key/unblacklist
Parameters
| Name | Type | Description |
|---|---|---|
| user_key | String | The users key |
Response
- Success
- Error
{ "success": true }
| Code | Message |
|---|---|
| 0 | user not blacklisted |
| 1 | account expired |
Resetting a users fingerprint
POST
/users/:user_key/reset
Parameters
| Name | Type | Description |
|---|---|---|
| user_key | String | The users key |
Body
| Name | Type | Nullable | Description |
|---|---|---|---|
| force | Boolean | ❌ | Bypass user cooldown |
Response
- Success
- Error
{ "success": true }
| Code | Message | Extra |
|---|---|---|
| 0 | account expired | |
| 1 | user doesnt have an assigned fingerprint | |
| 2 | project has resetting fingerprints disabled | |
| 3 | must wait before resetting fingerprint | cooldown_remaining: COOLDOWN_MS_LEFT |
Linking a user to a discord
POST
/users/:user_key/link
Parameters
| Name | Type | Description |
|---|---|---|
| user_key | String | The users key |
Body
| Name | Type | Nullable | Description |
|---|---|---|---|
| discord_id | String | ❌ | Discord id to link to |
| force | Boolean | ❌ | Ignore if key is already linked to a discord |
Response
- Success
- Error
{ "success": true }
| Code | Message |
|---|---|
| 0 | account expired |
| 1 | key already has a discord assigned to it |
| 2 | a key already exists with this discord |
Deleting a user
POST
/users/:user_key/remove
Parameters
| Name | Type | Description |
|---|---|---|
| user_key | String | The users key |
Response
- Success
{ "success": true }