Skip to content

xhs_publish_draft ​

将草稿发布到小红书。

参数 ​

参数类型必填说明
draftIdstring是草稿 ID
accountstring否使用的账号
accountsstring[] | "all"否多账号发布
scheduleTimestring否定时发布时间(ISO 8601 格式)

返回值 ​

单账号 ​

json
{
  "success": true,
  "draftId": "draft-uuid",
  "noteId": "published-note-id"
}

多账号 ​

json
[
  {
    "account": "账号1",
    "success": true,
    "noteId": "note-id-1"
  },
  {
    "account": "账号2",
    "success": true,
    "noteId": "note-id-2"
  }
]

示例 ​

立即发布 ​

xhs_publish_draft({
  draftId: "draft-uuid"
})

多账号发布 ​

xhs_publish_draft({
  draftId: "draft-uuid",
  accounts: ["账号1", "账号2"]
})

定时发布 ​

xhs_publish_draft({
  draftId: "draft-uuid",
  scheduleTime: "2024-01-15T10:00:00Z"
})

注意事项 ​

  • 发布后草稿会标记为已发布状态
  • 多账号发布会使用相同的内容

Released under the MIT License.