Add support for bulk account creation/import in qwen-gate through both the web panel and API, with support for API key authentication defined in configuration.
Goal
Allow administrators to add multiple accounts in a single operation via:
- Web admin panel
- API endpoint
- API key authentication (if configured)
Web UI Support
Add a bulk input section in the admin panel.
Supported format:
email|password
email|password
Optional JSON format:
[
{"email": "user1@mail.com", "password": "pass1"},
{"email": "user2@mail.com", "password": "pass2"}
]
UI requirements:
- Bulk text input field
- Input validation before submission
- Preview before applying changes
- Per-line result reporting
- Clear error messages (invalid format, duplicates, etc.)
API Support
Add a bulk import endpoint:
POST /api/admin/accounts/import
Authentication:
The endpoint must support:
- Bearer JWT token authentication (admin session)
- API key authentication from config (server-side key)
Example:
Authorization: Bearer <token>
or:
X-API-Key: <configured_api_key>
Request Body Examples
Pipe format:
{
"format": "pipe",
"data": "email|password\nemail|password"
}
JSON format (preferred):
{
"accounts": [
{"email": "user1@mail.com", "password": "pass1"},
{"email": "user2@mail.com", "password": "pass2"}
]
}
Required Behavior
- Validate email and required fields
- Detect duplicates (database + batch)
- Batch processing (non-blocking)
- Per-record response (success/failure + reason)
- Optional dry-run mode
- Maximum batch size limit
Security Considerations
- Require authentication (JWT or API key from config)
- API key must be configurable in server config
- Rate limiting for bulk imports
- Full audit logging of all bulk operations
Add support for bulk account creation/import in qwen-gate through both the web panel and API, with support for API key authentication defined in configuration.
Goal
Allow administrators to add multiple accounts in a single operation via:
Web UI Support
Add a bulk input section in the admin panel.
Supported format:
Optional JSON format:
[ {"email": "user1@mail.com", "password": "pass1"}, {"email": "user2@mail.com", "password": "pass2"} ]UI requirements:
API Support
Add a bulk import endpoint:
Authentication:
The endpoint must support:
Example:
or:
Request Body Examples
Pipe format:
{ "format": "pipe", "data": "email|password\nemail|password" }JSON format (preferred):
{ "accounts": [ {"email": "user1@mail.com", "password": "pass1"}, {"email": "user2@mail.com", "password": "pass2"} ] }Required Behavior
Security Considerations