API Portal

๐Ÿšจ Panic Mode (Enable / Disable User)

The Panic Mode API allows a cashier or manager to temporarily disable or enable a player account. It toggles the playerโ€™s alarm and enabled status and logs the action for administrative tracking.

โ„น๏ธ Description
  • Disabling a player immediately blocks their account access.
  • Re-enabling restores full access to the player.
  • Each change is logged with the responsible cashier ID and IP address.
  • The backend broadcasts this update via Redis to ensure real-time synchronization.
Endpoint
POST https://proapi.gapi.lol/api/cashier/user/{id}/panic-mode

Replace {id} with the target playerโ€™s unique ID.

Authentication

This endpoint requires authentication using a valid Bearer token:

Authorization: Bearer <your_token>
Accept: application/json
Request Body

The request can optionally include a panic_mode boolean (not required, toggle happens automatically):

{
  "panic_mode": true
}

When the user is currently active, this will disable them.
When already disabled, it will re-enable the account.

Successful Response (User Disabled)
{
  "success": true,
  "message": "User disabled successfully"
}
Successful Response (User Enabled)
{
  "success": true,
  "message": "User enabled successfully"
}
Example Request (cURL)
curl -X POST "https://proapi.gapi.lol/api/cashier/user/3154/panic-mode" \
  -H "Authorization: Bearer <your_token>" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{"panic_mode": true}'
Error Responses

401 Unauthorized โ€” Wrong username or password:

{
  "success": false,
  "message": "Please login via API token"
}

403 Forbidden โ€” Account suspended or disabled:

{
  "success": false,
  "message": "Account suspended"
}

429 Too Many Requests โ€” Rate limit exceeded:

{
  "success": false,
  "message": "Too many attempts. Try again later."
}

500 Internal Server Error โ€” Server-side issue:

{
  "success": false,
  "message": "Unexpected server error"
}