bilibili-API-collect/docs/message/msg.md
晨叶梦春 41d73f1a20
feat: 添加消息中心接口相关说明 (#983)
* Update charge_list.md

* Update charge_msg.md

* Update relation.md

* Update relation.md

* update

* Update monthly.md

* Update monthly.md

* update

* Update charge_list.md

* Update relation.md

* Update monthly.md

* Update README.md

* Update charge_list.md

* update

* Update relation.md

* Update relation.md

* Update relation.md

* Update info.md

* update

* update

* rename

* update docs

* update

* update

* update

* update

* add more docs

* update docs

* 更新 private_msg.md

* Update Layout.vue

* Update README.md

* 添加 #1008 相关说明

* Update README.md

* Update CONTRIBUTING.md

* Update CONTRIBUTING.md

* Update private_msg.md

* fix: typo

* update docs

* feat: #1033

* update docs

* fix: typo

* Update private_msg.md

* feat: add get users info

* 将 #983 中对此文件的更改合并到此 PR 中

* fix: typo

* update docs

* Update private_msg_content.md

* Update info.md

* 更新 danmaku_view_proto.md

* 更新 action.md

* 更新 info.md

* 更新 recommend.md

* 更新 readme.md

* feat: 规范化文档

* Update private_msg_content.md

* update docs

* update docs

* update docs

* Update info.md

* update docs

* fix duplicate content
2024-09-20 21:22:06 +08:00

2.8 KiB
Raw Blame History

通知消息

获取未读消息数

https://api.bilibili.com/x/msgfeed/unread https://api.vc.bilibili.com/x/im/web/msgfeed/unread (新接口)

请求方式GET

认证方式CookieSESSDATA

本接口不会返回未读的私信数,要获取未读的私信数请参阅未读私信数相关说明

URL参数:

参数名 类型 内容 必要性 备注
build num 客户端内部版本号 非必要 默认为 0
mobi_app str 平台标识 非必要 可为 web

json回复

根对象:

字段 类型 内容 备注
code num 返回值 0成功
-101账号未登录
message str 错误信息 默认为0
ttl num 1
data obj 信息本体

data 对象:

字段 类型 内容 备注
at num 未读at数
chat num 0 仅旧接口,作用尚不明确
coin num 未读投币数
danmu num 未读弹幕数
favorite num 未读收藏数
like num 未读点赞数
recv_like num 未读点赞数 like
recv_reply num 未读回复数 reply
reply num 未读回复数
sys_msg num 未读系统通知数
sys_msg_style num 1 仅新接口, 作用尚不明确
up num 未读UP主助手信息数

示例:

以下信息代表了未读点赞数为10未读回复数为4未读at消息数为3未读系统通知数为2未读UP主助手信息数为1

curl 'https://api.vc.bilibili.com/x/im/web/msgfeed/unread' \
-b 'SESSDATA=xxx'
查看响应示例:
{
	"code": 0,
	"message": "0",
	"ttl": 1,
	"data": {
		"at": 3,
		"chat": 0,
		"coin": 0,
		"danmu": 0,
		"favorite": 0,
		"like": 10,
		"recv_like": 10,
		"recv_reply": 4,
		"reply": 4,
		"sys_msg": 2,
		"sys_msg_style": 1,
		"up": 1
	}
}