From 83654fd39da6380881c0c3c3155b88e5ba0c5dd9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=99=A8=E5=8F=B6=E6=A2=A6=E6=98=A5?= <65224318+wuziqian211@users.noreply.github.com> Date: Sun, 20 Apr 2025 16:30:25 +0800 Subject: [PATCH] fix #1144 #1202 #1237 --- docs/user/info.md | 233 ++++++++++++++++++---------------------------- 1 file changed, 91 insertions(+), 142 deletions(-) diff --git a/docs/user/info.md b/docs/user/info.md index f4bbc8d..5413e18 100644 --- a/docs/user/info.md +++ b/docs/user/info.md @@ -955,11 +955,13 @@ curl -G 'https://api.bilibili.com/x/space/myinfo' \ *请求方式:GET* +认证方式:Cookie(SESSDATA) + **url参数:** | 参数名 | 类型 | 内容 | 必要性 | 备注 | | ------ | ---- | ----------------- | ------ | ---------------------------------- | -| uids | nums | 目标用户的mid列表 | 必要 | 每个成员间用`,`分隔,最多200个成员 | +| uids | nums | 目标用户的mid列表 | 必要 | 每个成员间用`,`分隔,最多50个成员 | **json回复:** @@ -967,7 +969,7 @@ curl -G 'https://api.bilibili.com/x/space/myinfo' \ | 字段 | 类型 | 内容 | 备注 | | ------- | ----- | -------- | -------------------------------------------------------- | -| code | num | 返回值 | 0:成功
-400:请求错误
40143:批量大小超过限制 | +| code | num | 返回值 | 0:成功
-101:账号未登录
-400:请求错误
40143:批量大小超过限制 | | message | str | 错误信息 | 默认为0 | | ttl | num | 1 | | | data | obj | 信息本体 | 用户信息随机排序 | @@ -983,16 +985,12 @@ curl -G 'https://api.bilibili.com/x/space/myinfo' \ | 字段 | 类型 | 内容 | 备注 | | ------------ | ---- | ------------------- | -------------------- | -| face | str | 头像链接 | | -| face_nft | num | 是否为 NFT 头像 | 0:不是 NFT 头像
1:是 NFT 头像 | -| face_nft_new | num | 是否为新版 NFT 头像 | | | mid | str | mid | | +| face | str | 头像链接 | | | name | str | 昵称 | | -| name_render | 有效时:obj
无效时:null | 昵称渲染信息 | | -| nameplate | 有效时:obj
无效时:null | 勋章信息 | 基本同「[用户空间详细信息](#用户空间详细信息)」中的 `data.nameplate` 对象 | | official | obj | 认证信息 | 基本同「[用户空间详细信息](#用户空间详细信息)」中的 `data.official` 对象 | -| pendant | 有效时:obj
无效时:null| 头像框信息 | 基本同「[用户空间详细信息](#用户空间详细信息)」中的 `data.pendant` 对象,其中有些类型为 `num` 的字段在本接口中类型为 `str` | | vip | obj | 会员信息 | 基本同「[用户空间详细信息](#用户空间详细信息)」中的 `data.vip` 对象,其中有些类型为 `num` 的字段在本接口中类型为 `str` | +| name_render | 有效时:obj
无效时:null | 昵称渲染信息 | | `{用户mid}`中的`name_render`对象: @@ -1042,35 +1040,30 @@ curl -G 'https://api.bilibili.com/x/polymer/pc-electron/v1/user/cards' \ "ttl": 1, "data": { "1": { - "face": "http://i1.hdslb.com/bfs/face/34c5b30a990c7ce4a809626d8153fa7895ec7b63.gif", - "face_nft": 0, - "face_nft_new": 0, "mid": "1", + "face": "http://i1.hdslb.com/bfs/face/34c5b30a990c7ce4a809626d8153fa7895ec7b63.gif", "name": "bishi", - "name_render": { - "colors_info": { "color": [], "color_ids": [ "6" ] }, - "render_scheme": "Default" + "official": { + "desc": "", + "role": 0, + "title": "", + "type": -1 }, - "nameplate": null, - "official": { "desc": "", "role": 0, "title": "", "type": -1 }, - "pendant": null, "vip": { - "avatar_icon": { - "icon_resource": { - "type": "ICON_RES_TYPE_IMAGE", - "url": "https://i0.hdslb.com/bfs/bangumi/kt/aba51485c0d02940c89aeefcf6680510d9858472.png" - }, - "icon_type": "ICON_TYPE_VIP_ACTIVITY" - }, "avatar_subscript": 1, "avatar_subscript_url": "", - "due_date": "1883059200000", + "due_date": "1912521600000", + "nickname_color": "#FB7299", + "role": "7", + "status": 1, + "theme_type": 0, + "type": 2, "label": { "bg_color": "#FB7299", "bg_style": 1, "border_color": "", "img_label_uri_hans": "", - "img_label_uri_hans_static": "https://i0.hdslb.com/bfs/bangumi/kt/fb0a74b14d6a4e119ae301ba2693febeda051030.png", + "img_label_uri_hans_static": "https://i0.hdslb.com/bfs/vip/adb599797dd171e2d3d6d012f448b49679258344.png", "img_label_uri_hant": "", "img_label_uri_hant_static": "https://i0.hdslb.com/bfs/activity-plat/static/20220614/e369244d0b14644f5e1a06431e22a4d5/sGu57N6pgK.png", "label_theme": "ten_annual_vip", @@ -1078,63 +1071,35 @@ curl -G 'https://api.bilibili.com/x/polymer/pc-electron/v1/user/cards' \ "text": "十年大会员", "text_color": "#FFFFFF", "use_img_label": true - }, + } + }, + "name_render": null + }, + "2": { + "mid": "2", + "face": "https://i2.hdslb.com/bfs/face/ef0457addb24141e15dfac6fbf45293ccf1e32ab.jpg", + "name": "碧诗", + "official": { + "desc": "", + "role": 2, + "title": "bilibili创始人(站长)", + "type": 0 + }, + "vip": { + "avatar_subscript": 1, + "avatar_subscript_url": "", + "due_date": "3995625600000", "nickname_color": "#FB7299", "role": "7", "status": 1, "theme_type": 0, - "tv_due_date": "1633622400", - "tv_vip_pay_type": 0, - "tv_vip_status": 0, "type": 2, - "vip_pay_type": 1 - } - }, - "2": { - "face": "https://i2.hdslb.com/bfs/face/ef0457addb24141e15dfac6fbf45293ccf1e32ab.jpg", - "face_nft": 0, - "face_nft_new": 0, - "mid": "2", - "name": "碧诗", - "name_render": { - "colors_info": { "color": [], "color_ids": [ "6" ] }, - "render_scheme": "Default" - }, - "nameplate": { - "condition": "所有自制视频总播放数>=10万", - "image": "https://i1.hdslb.com/bfs/face/e93dd9edfa7b9e18bf46fd8d71862327a2350923.png", - "image_small": "https://i2.hdslb.com/bfs/face/275b468b043ec246737ab8580a2075bee0b1263b.png", - "level": "普通勋章", - "name": "见习偶像", - "nid": 10 - }, - "official": { "desc": "", "role": 2, "title": "bilibili创始人(站长)", "type": 0 }, - "pendant": { - "expire": "0", - "image": "https://i2.hdslb.com/bfs/garb/item/488870931b1bba66da36d22848f0720480d3d79a.png", - "image_enhance": "https://i2.hdslb.com/bfs/garb/item/5974f17f9d96a88bafba2f6d18d647a486e88312.webp", - "image_enhance_frame": "https://i2.hdslb.com/bfs/garb/item/4316a3910bb0bd6f2f1c267a3e9187f0b9fe5bd0.png", - "n_pid": "32257", - "name": "EveOneCat2", - "pid": 32257 - }, - "vip": { - "avatar_icon": { - "icon_resource": { - "type": "ICON_RES_TYPE_IMAGE", - "url": "https://i0.hdslb.com/bfs/bangumi/kt/aba51485c0d02940c89aeefcf6680510d9858472.png" - }, - "icon_type": "ICON_TYPE_VIP_ACTIVITY" - }, - "avatar_subscript": 1, - "avatar_subscript_url": "", - "due_date": "3968841600000", "label": { "bg_color": "#FB7299", "bg_style": 1, "border_color": "", - "img_label_uri_hans": "", - "img_label_uri_hans_static": "https://i0.hdslb.com/bfs/bangumi/kt/53845a8ab8b226131c5d89b198d4b61de91d0aa2.png", + "img_label_uri_hans": "https://i0.hdslb.com/bfs/activity-plat/static/20220608/e369244d0b14644f5e1a06431e22a4d5/wltavwHAkL.gif", + "img_label_uri_hans_static": "https://i0.hdslb.com/bfs/vip/802418ff03911645648b63aa193ba67997b5a0bc.png", "img_label_uri_hant": "", "img_label_uri_hant_static": "https://i0.hdslb.com/bfs/activity-plat/static/20220614/e369244d0b14644f5e1a06431e22a4d5/8u7iRTPE7N.png", "label_theme": "ten_annual_vip", @@ -1142,43 +1107,29 @@ curl -G 'https://api.bilibili.com/x/polymer/pc-electron/v1/user/cards' \ "text": "十年大会员", "text_color": "#FFFFFF", "use_img_label": true - }, - "nickname_color": "#FB7299", - "role": "7", - "status": 1, - "theme_type": 0, - "tv_due_date": "2003500800", - "tv_vip_pay_type": 1, - "tv_vip_status": 1, - "type": 2, - "vip_pay_type": 0 - } + } + }, + "name_render": null }, "3": { - "face": "http://i0.hdslb.com/bfs/face/d4de6a84557eea8f18510a3f61115d96832aa071.jpg", - "face_nft": 0, - "face_nft_new": 0, "mid": "3", + "face": "http://i0.hdslb.com/bfs/face/d4de6a84557eea8f18510a3f61115d96832aa071.jpg", "name": "囧囧倉", - "name_render": { - "colors_info": { - "color": [ - { "color_day": "#CB7919", "color_night": "#E2963C" }, - { "color_day": "#E6A75B", "color_night": "#E6A75B" }, - { "color_day": "#E9BD67", "color_night": "#F8CE7E" } - ], - "color_ids": [ "6" ] - }, - "render_scheme": "Colorful" + "official": { + "desc": "", + "role": 0, + "title": "", + "type": -1 }, - "nameplate": null, - "official": { "desc": "", "role": 0, "title": "", "type": -1 }, - "pendant": null, "vip": { - "avatar_icon": null, "avatar_subscript": 0, "avatar_subscript_url": "", "due_date": "0", + "nickname_color": "", + "role": "0", + "status": 0, + "theme_type": 0, + "type": 0, "label": { "bg_color": "", "bg_style": 0, @@ -1192,17 +1143,9 @@ curl -G 'https://api.bilibili.com/x/polymer/pc-electron/v1/user/cards' \ "text": "", "text_color": "", "use_img_label": true - }, - "nickname_color": "", - "role": "0", - "status": 0, - "theme_type": 0, - "tv_due_date": "0", - "tv_vip_pay_type": 0, - "tv_vip_status": 0, - "type": 0, - "vip_pay_type": 0 - } + } + }, + "name_render": null } } } @@ -1216,6 +1159,8 @@ curl -G 'https://api.bilibili.com/x/polymer/pc-electron/v1/user/cards' \ *请求方式:GET* +认证方式:Cookie(SESSDATA) + 本接口较其他接口相比,只会返回非常有限的信息 **url参数:** @@ -1230,7 +1175,7 @@ curl -G 'https://api.bilibili.com/x/polymer/pc-electron/v1/user/cards' \ | 字段 | 类型 | 内容 | 备注 | | ------- | ----- | -------- | --------------------------- | -| code | num | 返回值 | 0:成功
-400:请求错误 | +| code | num | 返回值 | 0:成功
-101:账号未登录
-400:请求错误 | | message | str | 错误信息 | 默认为0 | | ttl | num | 1 | | | data | array | 信息本体 | 用户信息随机排序 | @@ -1269,34 +1214,38 @@ curl -G 'https://api.vc.bilibili.com/account/v1/user/cards' \ ```json { - "code": 0, - "message": "", - "ttl": 1, - "data": [{ - "mid": 1, - "name": "bishi", - "face": "http://i1.hdslb.com/bfs/face/34c5b30a990c7ce4a809626d8153fa7895ec7b63.gif", - "sign": "", - "rank": 10000, - "level": 6, - "silence": 0 - }, { - "mid": 2, - "name": "碧诗", - "face": "http://i2.hdslb.com/bfs/face/ef0457addb24141e15dfac6fbf45293ccf1e32ab.jpg", - "sign": "https://kami.im 直男过气网红 # We Are Star Dust", - "rank": 20000, - "level": 6, - "silence": 0 - }, { - "mid": 3, - "name": "囧囧倉", - "face": "http://i0.hdslb.com/bfs/face/d4de6a84557eea8f18510a3f61115d96832aa071.jpg", - "sign": "富强、民主、文明、和谐、自由、平等、公正、法治、爱国、敬业、诚信、友善。", - "rank": 10000, - "level": 6, - "silence": 0 - }] + "code": 0, + "message": "0", + "ttl": 1, + "data": [ + { + "mid": 3, + "name": "囧囧倉", + "face": "http://i0.hdslb.com/bfs/face/d4de6a84557eea8f18510a3f61115d96832aa071.jpg", + "sign": "富强、民主、文明、和谐、自由、平等、公正、法治、爱国、敬业、诚信、友善。", + "rank": 10000, + "level": 6, + "silence": 0 + }, + { + "mid": 2, + "name": "碧诗", + "face": "https://i2.hdslb.com/bfs/face/ef0457addb24141e15dfac6fbf45293ccf1e32ab.jpg", + "sign": "https://kami.im 直男过气网红 # We Are Star Dust", + "rank": 20000, + "level": 6, + "silence": 0 + }, + { + "mid": 1, + "name": "bishi", + "face": "http://i1.hdslb.com/bfs/face/34c5b30a990c7ce4a809626d8153fa7895ec7b63.gif", + "sign": "", + "rank": 10000, + "level": 6, + "silence": 0 + } + ] } ```