Skip to content

xhs_favorite_feed

Favorite or unfavorite a note.

Parameters

ParameterTypeRequiredDescription
noteIdstringYesNote ID
xsecTokenstringYesSecurity token
unfavoritebooleanNoUnfavorite (default false)
accountstringNoAccount to use
accountsstring[] | "all"NoMulti-account

Response

Single account

json
{
  "success": true,
  "action": "favorite",
  "noteId": "xxx"
}

Multi-account

json
[
  {
    "account": "acc1",
    "success": true,
    "result": { "action": "favorite", "noteId": "xxx" },
    "durationMs": 2500
  }
]

Example

Favorite

xhs_favorite_feed({
  noteId: "abc123",
  xsecToken: "token"
})

Unfavorite

xhs_favorite_feed({
  noteId: "abc123",
  xsecToken: "token",
  unfavorite: true
})

Multi-account favorite

xhs_favorite_feed({
  noteId: "abc123",
  xsecToken: "token",
  accounts: "all"
})

Released under the MIT License.