渠道管理/平台
平台发布选项
接口说明:查询指定平台在发布时是否需要平台专属的额外参数,以及这些参数的字段名、取值结构和账号要求。
返回的每个 data[n] 表示一个额外参数。常见场景包括 B 站分区 tid、YouTube 分类 categoryId、Threads 地点 location_id、Pinterest Board boardId。如果返回空数组,说明该平台当前没有需要通过发布选项接口处理的额外参数。
使用方式:取返回项中的 field,放到「发布选项可选值」接口路径参数 field 中查询可选值;如果后续返回项包含 filterSchema,按该 schema 将过滤条件作为查询参数传给「发布选项可选值」接口;如果包含 createSchema,可按该 schema 组织请求体后调用「创建发布选项值」接口。
GET
/
api
/
v2
/
channels
/
platforms
/
{platform}
/
publish-options
平台发布选项
curl --request GET \
--url https://aitoearn.cn/api/v2/channels/platforms/{platform}/publish-options \
--header 'X-Api-Key: <api-key>'import requests
url = "https://aitoearn.cn/api/v2/channels/platforms/{platform}/publish-options"
headers = {"X-Api-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Api-Key': '<api-key>'}};
fetch('https://aitoearn.cn/api/v2/channels/platforms/{platform}/publish-options', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://aitoearn.cn/api/v2/channels/platforms/{platform}/publish-options"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Api-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"code": 0,
"message": "请求成功",
"data": [
{
"field": "string",
"label": "string",
"description": "string",
"valueType": "string",
"requiresAccount": "boolean"
}
],
"requestId": "string"
}授权
需要从 AiToEarn 获取 API Key。点击前往「API Key 获取教程」。
路径参数
响应
200 - application/json
请求已被服务处理。业务是否成功以响应体 code === 0 为准。
业务状态码。0 表示成功,非 0 表示业务错误。
响应消息。
请求 ID。
错误响应时间戳,Unix 毫秒。
最后修改于 2026年9月29日
⌘I
平台发布选项
curl --request GET \
--url https://aitoearn.cn/api/v2/channels/platforms/{platform}/publish-options \
--header 'X-Api-Key: <api-key>'import requests
url = "https://aitoearn.cn/api/v2/channels/platforms/{platform}/publish-options"
headers = {"X-Api-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Api-Key': '<api-key>'}};
fetch('https://aitoearn.cn/api/v2/channels/platforms/{platform}/publish-options', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://aitoearn.cn/api/v2/channels/platforms/{platform}/publish-options"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Api-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"code": 0,
"message": "请求成功",
"data": [
{
"field": "string",
"label": "string",
"description": "string",
"valueType": "string",
"requiresAccount": "boolean"
}
],
"requestId": "string"
}
