Overview
The Users API allows you to programmatically create, update, and delete user accounts in GamePanelX. All user operations useclass=users in the API request.
Available Actions
create- Create a new user accountupdate- Update an existing user accountdelete- Delete a user account
Create User
Creates a new user account in GamePanelX.Endpoint
Parameters
Your API authentication key
Must be
usersMust be
createUsername for the new account (must be unique)
Password for the new account
Email address for the new account
First name of the user
Last name of the user
Example Request
Response
Returns
success if the user was created successfully, or an error message if creation failedThe underlying method returns a numeric user ID on success, but the API endpoint returns
success instead of the user ID.Update User
Updates an existing user account’s information.Endpoint
Parameters
Your API authentication key
Must be
usersMust be
updateThe ID of the user to update
New username for the account
New password for the account
New email address for the account
New first name
New last name
User’s preferred language (e.g.,
english, spanish)User’s preferred theme
Example Request
Response
Returns a success message or error
You only need to include the parameters you want to update. Parameters not included in the request will remain unchanged.
Delete User
Deletes a user account from GamePanelX.Endpoint
Parameters
Your API authentication key
Must be
usersMust be
deleteThe ID of the user to delete
Example Request
Response
Returns a success message or error
Common Errors
| Error Message | Cause | Solution |
|---|---|---|
Unknown API action | Invalid action specified | Use create, update, or delete |
Username already exists | Username is taken | Choose a different username |
User not found | Invalid user ID | Verify the user ID exists |
Best Practices
1. Store User IDs
When creating users, store the user ID for future update and delete operations. You can retrieve user IDs from the GamePanelX database or admin panel.2. Use Strong Passwords
3. Validate Email Addresses
Ensure email addresses are properly formatted before sending them to the API:4. Handle Username Uniqueness
Check if a username exists before attempting to create a new user to avoid conflicts.5. Partial Updates
When using the update action, you only need to include the fields you want to change:User Creation Workflow
Here’s a complete workflow for creating a user with error handling:Related Resources
Server API
Manage game servers
Authentication
API authentication guide