API Portal

๐Ÿ”‘ Update User Password Endpoint

The Update Password API allows a cashier or manager to reset or update the password of a specific player account under their shop. The password is updated securely, and the playerโ€™s userhash and extradata are refreshed automatically.

โš ๏ธ Important
  • Changing a playerโ€™s password immediately invalidates their current session.
  • Only cashiers or managers belonging to the same shop as the player can perform this action.
Endpoint
POST https://proapi.gapi.lol/api/cashier/user/update/{id}/password

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

Send the following JSON payload in the request body:

{
  "password": "password"
}
  • password โ€” required, string, minimum 6 characters.
Successful Response

When the password is successfully updated:

{
  "success": true,
  "message": "Password updated successfully"
}
Example Request (cURL)
curl -X POST "https://proapi.gapi.lol/api/cashier/user/update/3154/password" \
  -H "Authorization: Bearer <your_token>" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{"password": "newpassword123"}'
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"
}