xhs icon indicating copy to clipboard operation
xhs copied to clipboard

有什么办法可以通过 note_id 获取 xsec_token 吗?

Open Tonwed opened this issue 1 year ago • 9 comments

目前想尝试分享笔记直接拼接了url https://www.xiaohongshu.com/explore/66c31bc4000000001d03b63d 但是这个链接未登录的用户和手机端都无法直接访问到该笔记详情 必须得加上对应的xsec_token参数才可以 https://www.xiaohongshu.com/explore/66c31bc4000000001d03b63d?xsec_token=GBF7Fsgu9eGqN4a5BDROj3mRAw8BoUaaGF2b6fJzhLpeo=

目前我获取xsec_token的地方,在创作者中心获取发布笔记的列表,里面包含自己发布的每个笔记对应的xsec_token /api/galaxy/creator/note/user/posted

{ "id": "66c31bc4000000001d03b63d", "time": "2024-08-19 18:17", "timestamp": null, "type": "video", "likes": 1, "sticky": false, "level": 4, "display_title": "\uD83E\uDD23师傅说他切糕很牛掰,非要我拍一下。。", "view_count": 2117, "shared_count": 0, "comments_count": 0, "collected_count": 1, "video_info": { "duration": 9 }, "images_list": [ { "url": "http://sns-img-hw.xhscdn.com/spectrum/1040g34o316m76furgm0g5n16gq11u51onhgbb8g?imageView2/2/w/1080/format/jpg" } ], "permission_code": 0, "permission_msg": "", "post_timing": false, "schedule_post_time": 0, "high_self": 0, "tab_status": 1, "goods_info": null, "xsec_token": "GBF7Fsgu9eGqN4a5BDROj3mRAw8BoUaaGF2b6fJzhLpeo=", "xsec_source": "pc_creatormng" }

但是如果不是自己笔记就不知道怎么获取 note_id 对应的 xsec_token 了

Tonwed avatar Sep 07 '24 01:09 Tonwed

同问

cpj10010 avatar Oct 30 '24 05:10 cpj10010

同问

YLDJack avatar Nov 05 '24 03:11 YLDJack

同问

mung07 avatar Nov 14 '24 09:11 mung07

同问?

liuxgui avatar Nov 14 '24 11:11 liuxgui

有人解决了吗

ShaoY0000 avatar Jan 10 '25 06:01 ShaoY0000

同问

lihongjie224 avatar Jan 16 '25 15:01 lihongjie224

我通过nodeId 可以访问到对应的数据呀

Tian-servlet avatar Jan 22 '25 09:01 Tian-servlet

同问

ssssssqy avatar Mar 18 '25 03:03 ssssssqy