Tài liệu API
Dùng token để gọi API lấy dữ liệu key một cách an toàn.
Xác thực
Mọi request gửi kèm header:
Authorization: Bearer <token>
Token lấy ở trang API Token. Chấp nhận Personal Access Token (scope read / read write) hoặc JWT access token của phiên web.
Endpoints
| Method | Path | Scope | Mô tả |
|---|---|---|---|
| GET | /api/v1/me | read | Thông tin tài khoản |
| GET | /api/v1/price | read | Giá cơ bản (VND/USD) |
| GET | /api/v1/keys | read | Danh sách key của bạn |
| GET | /api/v1/keys/{key} | read | Chi tiết 1 key |
| POST | /api/v1/keys/reset | write | Reset HWID (body: key_id hoặc key) |
| GET | /api/v1/invoices | read | Lịch sử hoá đơn |
| GET | /api/v1/admin/stats | admin | Thống kê (chỉ admin) |
| GET | /api/v1/admin/user/{discord_id} | admin | Key theo Discord ID |
Ví dụ
curl -H "Authorization: Bearer qh_xxx" https://manager.quanghuynopro.com/api/v1/keys
curl -X POST -H "Authorization: Bearer qh_xxx" -H "Content-Type: application/json" \
-d '{"key_id":123}' https://manager.quanghuynopro.com/api/v1/keys/reset