アカウント状態 API
このページでは、デバイスのオンライン/オフライン状態、ログイン状態、タグを含め、TikMatrix で管理されているすべてのアカウントの状態を照会する API エンドポイントについて説明します。
アカウント一覧
拡張された状態情報付きですべてのアカウントを取得します。
- エンドポイント:
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 | 1ページあたりの件数(最大 100) |
レスポンスフィールド
| フィールド | 型 | 説明 |
|---|---|---|
| accounts | array | アカウントオブジェクトの一覧(以下を参照) |
| total | integer | フィルタ条件に一致するアカウント総数 |
| page | integer | 現在のページ番号 |
| page_size | integer | 1ページあたりの件数 |
アカウントオブジェクト
| フィールド | 型 | 説明 |
|---|---|---|
| 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 | Forbidden — API アクセスには Pro+ プランが必要です |
| 500 | 50001 | サーバー内部エラー |