API สถานะบัญชี
หน้านี้อธิบาย API endpoint สำหรับค้นหาสถานะของบัญชีทั้งหมดที่จัดการใน TikMatrix รวมถึงสถานะออนไลน์/ออฟไลน์ของอุปกรณ์ สถานะการเข้าสู่ระบบ และแท็ก
รายการบัญชี
ดึงข้อมูลบัญชีทั้งหมดพร้อมข้อมูลสถานะเพิ่มเติม
- เอ็นด์พอยต์:
GET /api/v1/accounts
พารามิเตอร์คำขอ
| พารามิเตอร์ | ประเภท | ค่าเริ่มต้น | คำอธิบาย |
|---|---|---|---|
| platform | string | — | กรองตามแพลตฟอร์ม: tiktok หรือ instagram |
| device | string | — | กรองตามหมายเลขซีเรียลของอุปกรณ์ |
| logined | integer | — | กรองตามสถานะการเข้าสู่ระบบ: 0 = ยังไม่ได้เข้าสู่ระบบ, 1 = เข้าสู่ระบบแล้ว |
| status | integer | — | กรองตามสถานะบัญชี: 0 = เปิดใช้งาน, 1 = ปิดใช้งาน |
| tag | string | — | กรองตามแท็ก (ตรงกันแบบ สมบูรณ์) |
| page | integer | 1 | หมายเลขหน้า (เริ่มที่ 1) |
| page_size | integer | 20 | จำนวนรายการต่อหน้า (สูงสุด 100) |
ฟิลด์การตอบกลับ
| ฟิลด์ | ประเภท | คำอธิบาย |
|---|---|---|
| accounts | array | รายการอ็อบเจ็กต์บัญชี (ดูด้านล่าง) |
| total | integer | จำนวนบัญชีทั้งหมดที่ตรงกับตัวกรอง |
| page | integer | หมายเลขหน้าปัจจุบัน |
| page_size | integer | จำนวนรายการต่อหน้า |
อ็อบเจ็กต์บัญชี
| ฟิลด์ | ประเภท | คำอธิบาย |
|---|---|---|
| id | integer | ID บัญชีในฐานข้อมูล |
| username | string | null | ชื่ อผู้ใช้โซเชียลมีเดีย |
| string | null | ที่อยู่อีเมลของบัญชี | |
| platform | string | แพลตฟอร์ม: tiktok หรือ instagram |
| packagename | string | null | ชื่อแพ็กเกจของแอปโคลน (null = แอปเริ่มต้น) |
| device | string | null | หมายเลขซีเรียลอุปกรณ์ ADB |
| device_online | boolean | อุปกรณ์เชื่อมต่ออยู่ในขณะนี้หรือไม่ |
| device_name | string | ชื่อรุ่นอุปกรณ์ (เป็นสตริงว่างเมื่อออฟไลน์) |
| logined | integer | 0 = ยังไม่ได้เข้าสู่ระบบ, 1 = เข้าสู่ระบบแล้ว |
| logined_text | string | "logged_in" หรือ "not_logged_in" |
| status | integer | 0 = เปิดใช้งาน, 1 = ปิดใช้งาน |
| status_text | string | "enabled" หรือ "disabled" |
| tags | string[] | แท็กที่กำหนดให้กับบัญชีนี้ |
ความปลอดภัย
รหัสผ่านบัญชีจะ ไม่ ถูกรวมอยู่ในการตอบกลับของ API
ตัวอย่าง
curl "http://localhost:50809/api/v1/accounts?page=1&page_size=20"
กรองตามแพลตฟอร์มและสถานะการเข้าสู่ระบบ:
curl "http://localhost:50809/api/v1/accounts?platform=tiktok&logined=1&page=1&page_size=50"
กรองตามหมายเลขซีเรียลของอุปกรณ์:
curl "http://localhost:50809/api/v1/accounts?device=emulator-5554"
ตัวอย่างการตอบกลับ
{
"code": 0,
"message": "success",
"data": {
"accounts": [
{
"id": 1,
"username": "my_tiktok_user",
"email": "user@example.com",
"platform": "tiktok",
"packagename": null,
"device": "emulator-5554",
"device_online": true,
"device_name": "sdk_gphone64_x86_64",
"logined": 1,
"logined_text": "logged_in",
"status": 0,
"status_text": "enabled",
"tags": ["batch-a", "vip"]
},
{
"id": 2,
"username": "another_user",
"email": null,
"platform": "tiktok",
"packagename": "com.zhiliaoapp.musically.clone1",
"device": "192.168.1.101:5555",
"device_online": false,
"device_name": "",
"logined": 0,
"logined_text": "not_logged_in",
"status": 1,
"status_text": "disabled",
"tags": []
}
],
"total": 2,
"page": 1,
"page_size": 20
}
}
การตอบกลับข้อผิดพลาด
| สถานะ HTTP | โค้ด | คำอธิบาย |
|---|---|---|
| 403 | 40301 | ถูกปฏิเสธ — การเข้าถึง API ต้องใช้แพ็กเกจ Pro+ |
| 500 | 50001 | ข้อผิดพลาดภายในเซิร์ฟเวอร์ |