测试 Webflow 连接
POST /projects/{project_id}/agent/settings/test-webflow
请求体
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
project_id | string (UUID) | 是 | 与 URL 路径中相同的项目 ID |
site_id | string | 是 | Webflow 站点 ID |
api_token | string | 是 | Webflow API 令牌 |
curl -X POST "https://topify-customer-api-production.up.railway.app/api/public/v1/projects/{project_id}/agent/settings/test-webflow" \
-H "X-API-Key: tk_live_..." \
-H "Content-Type: application/json" \
-d '{
"project_id": "a1b2c3d4-...",
"site_id": "65abc123...",
"api_token": "webflow-token"
}'
响应
{
"success": true,
"data": {
"success": true,
"error": null,
"collections": [
{ "id": "collection-id", "title": "Blog posts" }
]
}
}
请将 Webflow 令牌视为机密信息。不要记录它,也不要将它放入智能体对话历史。
错误响应
| 状态码 | 原因 |
|---|---|
400 | 缺少项目 ID、站点 ID、API 令牌,或 JSON 无效 |
403 | API 密钥所属团队无法访问项目 |
500 | Webflow 拒绝凭证或连接测试失败 |