Open nita0318 opened 2 years ago
https://github.com/SocialSisterYi/bilibili-API-collect/blob/master/live/info.md#%E8%8E%B7%E5%8F%96%E6%88%BF%E9%97%B4%E9%A1%B5%E5%88%9D%E5%A7%8B%E5%8C%96%E4%BF%A1%E6%81%AF
json回复的data对象中的encrypted字段为true且pwd_verified字段为false时说明需要验证直播间密码
https://api.live.bilibili.com/room/v1/Room/verify_room_pwd
请求方式:GET
URL参数:
请求链接示例: https://api.live.bilibili.com/room/v1/Room/verify_room_pwd?room_id=22926711&pwd=c57JCi6Yc1qP
https://api.live.bilibili.com/room/v1/Room/verify_room_pwd?room_id=22926711&pwd=c57JCi6Yc1qP
响应 密码正确: {"code":0,"msg":"欢迎老司机(∩_∩)","data":{}}
{"code":0,"msg":"欢迎老司机(∩_∩)","data":{}}
普通未加密房间: {"code":0,"msg":"room_not_encrypted","data":{}}
{"code":0,"msg":"room_not_encrypted","data":{}}
参数错误: {"code":1,"msg":"invalid params","message":"invalid params","data":[]}
{"code":1,"msg":"invalid params","message":"invalid params","data":[]}
感谢提供
似乎该 API 并不限制访问次数,并且无需鉴权。 密码范围实测为满足 [a-zA-Z0-9] 的至多 20 位字符串。
获取房间信息
json回复的data对象中的encrypted字段为true且pwd_verified字段为false时说明需要验证直播间密码
验证密码是否正确
请求方式:GET
URL参数:
请求链接示例:
https://api.live.bilibili.com/room/v1/Room/verify_room_pwd?room_id=22926711&pwd=c57JCi6Yc1qP
响应 密码正确:
{"code":0,"msg":"欢迎老司机(∩_∩)","data":{}}
普通未加密房间:
{"code":0,"msg":"room_not_encrypted","data":{}}
参数错误:
{"code":1,"msg":"invalid params","message":"invalid params","data":[]}