RoomScope

Cập nhật lần cuối

Tài khoản

Gói, giới hạn và mức dùng credit của workspace sở hữu key.

Mọi thao tác đều xác thực bằng API key (Authorization: Bearer <key>) và lỗi dùng chung envelope được mô tả trong Lỗi. Được tạo từ tài liệu OpenAPI của API.

Lấy gói và giới hạn

GET/v1/entitlements

Gói, module, giới hạn tốc độ và ví credit của workspace trong một kỳ thanh toán: limits.watchlistMax, limits.requestsPerMinute (số request bằng API key mỗi phút, tính chung mọi key của workspace), credits.hardCap (credit của gói cộng top-up trong kỳ), credits.resetAt (lúc credit của kỳ được reset), exports (lượt export trong app hôm nay; perDay là 0 ở gói free và null, không giới hạn, ở gói trả phí) và money (1 kim cương tính theo USD gộp ước tính, phần của creator và tỷ giá VND theo tháng: ước tính để hiển thị, không bao giờ là khoản TikTok trả).

Scopekeys:manageCreditMiễn phí

Tham số query

Tham số query · GET /v1/entitlements
NameTypeDescription
periodOptional
stringNgày bắt đầu kỳ thanh toán, YYYY-MM-01; mặc định là kỳ hiện tại.

Request

curl "https://api.next.toktokdata.live/v1/entitlements" \  -H "Authorization: Bearer $ROOMSCOPE_API_KEY"

Response

200 OK
{  "data": {    "workspaceId": "4388fdb0-ef68-5d01-ac84-b683b2b355e8",    "planCode": "agency",    "tier": "agency",    "modules": [      "live",      "lookup"    ],    "limits": {      "requestsPerWindow": 150,      "rateWindowMs": 1000,      "apiRequestsPerSecond": 150,      "requestsPerDay": 1200000,      "requestsPerMinute": 9000,      "maxApiKeys": 0,      "wsConcurrencyCap": 200,      "maxRoomMinutesPerMonth": 800000,      "historyWindowDays": 365,      "maxSeats": 10,      "seatsUsed": 2,      "exportFormats": [        "csv",        "xlsx"      ],      "watchlistMax": 25    },    "credits": {      "period": "2026-11-01",      "monthlyAllotment": 36000000,      "hardCap": 36000000,      "spent": 0,      "remaining": 0,      "resetAt": "2026-12-01T00:00:00.000Z"    },    "money": {      "diamondUsdGross": 0.01,      "creatorShare": 0.5,      "vndPerUsd": 25500,      "rateLabel": "estimate · 2026-11"    },    "exports": {      "perDay": null,      "usedToday": 1    }  },  "provenance": {    "observedAt": "2026-11-01T11:19:24.411834Z",    "freshness": "near_realtime",    "source": "plan_entitlement",    "sourceKind": "derived",    "coverageStatus": "observed",    "methodologyVersion": "entitlements-v1",    "window": {      "from": "2026-11-01",      "to": "2026-12-01",      "label": "2026-11"    }  }}

Lỗi

  • 400 Tham số hoặc body không hợp lệ; code cho biết vấn đề.
  • 401 API key bị thiếu hoặc không xác định.
  • 403 Key thiếu scope, hoặc gói không bao gồm tính năng này.
  • 429 Vượt tốc độ request (theo giây, theo phút hoặc theo ngày); hãy tuân theo Retry-After.

Lấy mức dùng credit

GET/v1/usage

Số credit đã dùng theo từng thao tác trong một kỳ thanh toán.

Scopekeys:manageCreditMiễn phí

Tham số query

Tham số query · GET /v1/usage
NameTypeDescription
periodOptional
stringNgày bắt đầu kỳ thanh toán, YYYY-MM-01; mặc định là kỳ hiện tại.
limitOptional
integerSố dòng tối đa.

Request

curl "https://api.next.toktokdata.live/v1/usage" \  -H "Authorization: Bearer $ROOMSCOPE_API_KEY"

Response

200 OK
{  "period": "2026-11-01",  "balance": {    "remaining": 0,    "spent": 0  },  "items": [],  "provenance": {    "observedAt": "2026-11-01T10:00:00.000Z",    "freshness": "near_realtime",    "source": "credit_ledger",    "sourceKind": "derived",    "coverageStatus": "observed",    "methodologyVersion": "usage-v1",    "window": {      "from": "2026-11-01",      "to": "2026-12-01",      "label": "2026-11"    }  }}

Lỗi

  • 400 Tham số hoặc body không hợp lệ; code cho biết vấn đề.
  • 401 API key bị thiếu hoặc không xác định.
  • 403 Key thiếu scope, hoặc gói không bao gồm tính năng này.
  • 429 Vượt tốc độ request (theo giây, theo phút hoặc theo ngày); hãy tuân theo Retry-After.
Trang này có hữu ích không?