AILIVE文档
API 参考接口列表

登记平台来源

登记本客户端采集的平台直播间(需要 `data` 权限)。重复登记返回同一个来源,并更新它的声明。

POST
/v1/room/sources

请求头参数

authorization?string|null

请求正文

application/json
  1. body
capabilities?
字段properties <= 40
channel*Channel
可选值"page_push""page_poll""page_dom""console_page""manual"
collector*
identity*Identity
可选值"full""masked""masked_nokey"
loginState*Loginstate
可选值"anonymous""viewer""owner"
platform*Platform
可选值"douyin""kuaishou""taobao""jd""wechat_channels""xiaohongshu""bilibili""other"
platformLiveId?|null
platformRoom*

响应正文

Successful Response

application/json
  1. response
interaction*Interaction
limits*
platformRoomId*Platformroomid
格式uuid
sourceId*Sourceid
格式uuid
请求示例
curl -X POST 'https://api.ailive.studio/v1/room/sources' \  -H 'Authorization: Bearer <ACCESS_TOKEN>' \  -H 'Content-Type: application/json' \  -d '{  "channel": "page_push",  "collector": {    "kind": "page_inject",    "name": "string",    "version": "string"  },  "identity": "full",  "loginState": "anonymous",  "platform": "douyin",  "platformRoom": {    "id": "string",    "name": "string"  }}'
响应示例
{  "interaction": true,  "limits": {    "maxBatch": 0,    "maxItemsPerSecond": 0  },  "platformRoomId": "2d2f041a-ab93-4da0-bd4b-194162ba1dcc",  "sourceId": "797f5a94-3689-4ac8-82fd-d749511ea2b2"}