Skip to content

xhs_like_comment

Like or unlike a comment.

Parameters

ParameterTypeRequiredDescription
noteIdstringYesNote ID
xsecTokenstringYesSecurity token
commentIdstringYesComment ID
unlikebooleanNoUnlike instead of like (default: false)
accountstringNoAccount to use
accountsstring[] | "all"NoMulti-account operation

Response

json
{
  "success": true,
  "action": "like_comment",
  "commentId": "xxx"
}

Examples

Like a comment

xhs_like_comment({
  noteId: "abc123",
  xsecToken: "token",
  commentId: "comment-id"
})

Unlike a comment

xhs_like_comment({
  noteId: "abc123",
  xsecToken: "token",
  commentId: "comment-id",
  unlike: true
})

Released under the MIT License.