๐ 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"
}