Skip to content

xhs_post_comment

Post a comment.

Parameters

ParameterTypeRequiredDescription
noteIdstringYesNote ID
xsecTokenstringYesSecurity token
contentstringYesComment content
accountstringNoAccount to use
accountsstring[] | "all"NoMulti-account

Response

json
{
  "success": true,
  "commentId": "comment-id"
}

Example

Post comment

xhs_post_comment({
  noteId: "abc123",
  xsecToken: "token",
  content: "Great post!"
})

Multi-account comment

xhs_post_comment({
  noteId: "abc123",
  xsecToken: "token",
  content: "Nice!",
  accounts: ["acc1", "acc2"]
})

Notes

  • Follow community guidelines
  • Frequent comments may trigger rate limits

Released under the MIT License.