feat: 各种接口补充与错误修正 (#1066)

* fix(video/collection.md): unclosed xml tags

* feat(video/report.md): uuid not really random

* feat: b23.tv short link

* feat: login/moral/exp log

* feat: v_voucher

* feat: upload video cover & post

* feat(creativecenter/upload.md): upload octet-stream

* feat(creativecenter/upload.md): update some notes

* feat(clientinfo/ip.md): another from live

* feat: live web heartbeat

* feat: update popular series & precious

* fix(creativecenter/upload.md): mistakes in example

* feat: merge duplicate fav info

* feat(README.md): missing link to webmask

* feat(search/hot.md): word_type

* feat(login/login_action): recovery old api

* feat(video/collection.md):  series operation

* feat: video season operation

* feat: add & mod some links

* feat(search/suggest.md): up to date

* feat: web home header image

* feat(misc/sign/bili_ticket.md): demo for nodejs

* feat(creativecenter/upload.md): x-upos-auth validity period

* feat: add referer & buvid3 to request header

* feat: customer service message heartbeat & upload

* feat(customerservice/msg.md): upload code 1200201

* feat(video/report.md): click/web/h5

* feat(video/report.md): view count desc

* feat: laser2

* feat: wbi_key in bili_ticket

* fix: typo & unclosed XML tags

* feat(misc/sign/v_voucher): cookie x-bili-gaia-vtoken

* feat(search/hot.md): square

* feat(video/status_number.md): fold archive_stat/stat

* feat(fav/info.md): resource/infos invalid type 21

* feat: /x/activity/subject/info

* feat: lottery

* feat(docs/misc/b23.tv): remove some unnecessary fields

* feat(creativecenter/upload.md): types/predict

* fix(video/collection.md): invalid end tag

* feat: app version upgrade

* feat(creativecenter/upload.md): tag/recommend #528

* feat(user/status_number.md): navnum

* feat: /x/activity/page/list

* feat(comment/list.md): desc about pagination_str

* feat(comment/list.md): update example

* feat(dynamic/all.md): #1082

* fix(comment/list.md): -352 not -412

* feat: #700

* feat(video/video_stream.md): #606 & cv949156

* feat(message/private_msg.md): single_unread freq

* feat: getUserWallet

* fix: broken form

* feat(Layout.vue): copyright to 2024

* feat: /x/topic/pub/rcmd/search

* feat: #425

* feat(misc/time_stamp.md): rtc/getTimestamp

* fix(misc/time_stamp.md): missing end tag

* feat: #745

* feat(dynamic/all.md): update feed/all

* feat(danmaku/action.md): #220

* feat(live/info.md): gethistory from cv8186413

* fix(danmaku/action.md): missing end tag
This commit is contained in:
Session小胡
2024-08-21 19:02:39 +08:00
committed by GitHub
parent f7599fb693
commit 60a0c5d1a2
46 changed files with 18489 additions and 8207 deletions

View File

@@ -109,7 +109,7 @@ data 对象:
| 字段 | 类型 | 内容 | 备注 |
|---------------|-----|-------------------|------------------------|
| message | str | 扫码状态信息 | |
| message | str | 扫码状态信息 | 若提示 `本次登录环境存在风险, 需使用手机号进行验证或绑定`, 参见 [手机号验证](#手机号验证) |
| refresh_token | str | 刷新`refresh_token` | |
| status | num | 0 | |
| timestamp | num | 登录时间 | 未登录为`0`<br />时间戳 单位为毫秒 |
@@ -480,4 +480,309 @@ public class Test3 {
}
}
```
```
## 手机号验证
### 简述
有时 [登录操作(web端)](#登录操作web端) (APP 端可能也有类似操作) 会返回如下内容, 此时需要进行手机号验证或绑定
```json
{
"code": 0,
"message": "0",
"ttl": 1,
"data": {
"is_new": false,
"status": 2,
"message": "本次登录环境存在风险, 需使用手机号进行验证或绑定",
"url": "https://passport.bilibili.com/h5-app/passport/risk/verify?tmp_token=imtmptk&request_id=imreqid&source=risk",
"refresh_token": "",
"timestamp": 0,
"hint": "",
"in_reg_audit": 0
}
}
```
### 获取 captcha
> https://passport.bilibili.com/x/safecenter/captcha/pre
*请求方法: POST*
**正文参数 (application/x-www-form-urlencoded):**
| 参数名 | 类型 | 内容 | 必要性 | 备注 |
| ----- | ---- | ---- | ---- | ---- |
| source | str | risk | 不必要 | |
**JSON 回复:**
根对象:
| 字段 | 类型 | 内容 | 备注 |
| --- | --- | --- | --- |
| code | num | 返回值 | 0: 成功 |
| message | str | 错误信息 | 默认为 0 |
| ttl | num | 1 | |
| data | obj | 数据本体 | |
`data` 对象:
| 字段 | 类型 | 内容 | 备注 |
| --- | --- | --- | --- |
| recaptcha_type | str | 验证码类型 | 目前仅 `geetest` |
| recaptcha_token | str | 验证码 token | |
| gee_challenge | str | 极验 challenge | |
| gee_gt | str | 极验 gt | |
**示例:**
```shell
curl -X POST 'https://passport.bilibili.com/x/safecenter/captcha/pre'
```
<details>
<summary>查看响应示例:</summary>
```json
{
"code": 0,
"message": "0",
"ttl": 1,
"data": {
"recaptcha_type": "geetest",
"recaptcha_token": "8a418aa9eebe411599d759fc318d55e1",
"gee_challenge": "4e5353e7ab9f9aef0c97fa5a5b1ad101",
"gee_gt": "ac597a4506fee079629df5d8b66dd4fe"
}
}
```
</details>
### 发送验证码
> https://passport.bilibili.com/x/safecenter/common/sms/send
*请求方法: POST*
**正文参数 (application/x-www-form-urlencoded):**
| 参数名 | 类型 | 内容 | 必要性 | 备注 |
| ------ | - | ---- | ---- | ---- |
| tmp_code| str | url query 中的 tmp_code | 必要 | 参见 [简述](#简述) 中 JSON 示例中的 `url` |
| sms_type | str | `loginTelCheck` | 必要 | |
| recaptcha_token | str | 验证码 token | 必要 | 参见 [获取 captcha](#获取-captcha) |
| gee_challenge | str | 极验 challenge | 必要 | 参见 [获取 captcha](#获取-captcha) |
| gee_validate | str | 极验 validate | 必要 | 验证后获得 |
| gee_seccode | str | 极验 seccode | 必要 | 验证后获得 |
**JSON回复:**
根对象:
| 字段 | 类型 | 内容 | 备注 |
| --- | --- | --- | --- |
| code | num | 返回值 | 0: 成功 |
| message | str | 错误信息 | 默认为 0 |
| ttl | num | 1 | |
| data | obj | 数据本体 | |
`data` 对象:
| 字段 | 类型 | 内容 | 备注 |
| --- | --- | -- | - |
| captcha_key | str | 验证码 key | |
**示例:**
假设 `tmp_code``imtmptk`,
`recaptcha_token``kfc`,
`gee_challenge``crazythursday`,
`gee_validate``vivo50`,
`gee_seccode``vivo50|jordan`
```shell
curl -X POST 'https://passport.bilibili.com/x/safecenter/common/sms/send' \
--data-urlencode 'tmp_code=imtmptk' \
--data-urlencode 'sms_type=loginTelCheck' \
--data-urlencode 'recaptcha_token=kfc' \
--data-urlencode 'gee_challenge=crazythursday' \
--data-urlencode 'gee_validate=vivo50' \
--data-urlencode 'gee_seccode=vivo50|jordan'
```
<details>
<summary>查看响应示例:</summary>
```json
{
"code": 0,
"message": "0",
"ttl": 1,
"data": {
"captcha_key": "42403fb08ed2cd97afff14edefbae482"
}
}
```
</details>
### 验证手机验证码
> https://passport.bilibili.com/x/safecenter/login/tel/verify
*请求方法: POST*
**正文参数 (application/x-www-form-urlencoded):**
| 参数名 | 类型 | 内容 | 必要性 | 备注 |
| ------ | - | ---- | ---- | ---- |
| tmp_code | str | url query 中的 tmp_code | 必要 | 参见 [简述](#简述) 中 JSON 示例中的 `url` |
| captcha_key | str | 验证码 key | 必要 | 参见 [发送验证码](#发送验证码) |
| type | str | `loginTelCheck` | 必要 | |
| code | num | 接收到的验证码 | 必要 | |
| request_id | str | url query 中的 request_id | 必要 | 参见 [简述](#简述) 中 JSON 示例中的 `url` |
| source | str | risk | 必要 | |
**JSON回复:**
根对象:
| 字段 | 类型 | 内容 | 备注 |
| --- | --- | --- | --- |
| code | num | 返回值 | 0: 成功 |
| message | str | 错误信息 | 默认为 0 |
| ttl | num | 1 | |
| data | obj | 数据本体 | |
`data` 对象:
| 字段 | 类型 | 内容 | 备注 |
| --- | --- | --- | --- |
| code | str | 交换代码 | 用于后面 [交换 Cookie](#交换-cookie) |
**示例:**
假设 `tmp_code``imtmptk`,
`captcha_key``42403fb08ed2cd97afff14edefbae482`,
`code``114514`,
`request_id``imreqid`
```shell
curl -X POST 'https://passport.bilibili.com/x/safecenter/login/tel/verify' \
--data-urlencode 'tmp_code=imtmptk' \
--data-urlencode 'captcha_key=42403fb08ed2cd97afff14edefbae482' \
--data-urlencode 'type=loginTelCheck' \
--data-urlencode 'code=114514' \
--data-urlencode'request_id=imreqid' \
--data-urlencode'source=risk'
```
<details>
<summary>查看响应示例:</summary>
```json
{
"code": 0,
"message": "0",
"ttl": 1,
"data": {
"code": "6eadf783c55a387b143773282b217682"
}
}
```
</details>
### 交换 Cookie
> https://passport.bilibili.com/x/passport-login/web/exchange_cookie
*请求方法: POST*
**正文参数 (application/x-www-form-urlencoded):**
| 参数名 | 类型 | 内容 | 必要性 | 备注 |
| ------ | - | ---- | ---- | ---- |
| source | str | risk | 必要 | |
| code | str | 交换代码 | 必要 | 参见 [验证手机验证码](#验证手机验证码) |
**JSON回复:**
根对象:
| 字段 | 类型 | 内容 | 备注 |
| --- | --- | --- | --- |
| code | num | 返回值 | 0: 成功 |
| message | str | 错误信息 | 默认为 0 |
| ttl | num | 1 | |
| data | obj | 数据本体 | |
`data` 对象:
| 字段 | 类型 | 内容 | 备注 |
| --- | --- | - | - |
| url | str | 游戏分站跨域登录 url | |
| refresh_token | str | 刷新 token | |
**示例:**
假设 `code``6eadf783c55a387b143773282b217682`
```shell
curl -X POST 'https://passport.bilibili.com/x/passport-login/web/exchange_cookie' \
--data-urlencode 'code=6eadf783c55a387b143773282b217682' \
--data-urlencode'source=risk'
```
<details>
<summary>查看响应示例:</summary>
```json
{
"code": 0,
"message": "0",
"ttl": 1,
"data": {
"url": "https://passport.biligame.com/x/passport-login/web/crossDomain?DedeUserID=645769214&DedeUserID__ckMd5=653409864bf9e200&Expires=1739265009&SESSDATA=11d97d2a,1739265009,928d7*82CjCKOhDRm5gROpSfgQ7B2axGVMWm5LuwNTkNDK2vjeGl7xvAsfsCINKmczXvO_Z45FsSVlJ1NHdlYlpSei1lYjdqUXRMaUpuRk9GbjVPS0psc3ZTcDFGRjhnNGhIbHRlZ0ZQRWQ1MUlUY2pnQ0lkTVRYNjlabmlUWGxHcVdkV3hrcElpa0ZEZEZRIIEC&bili_jct=3cdee5b84eb48d4f08bcfd57b58cf40b&gourl=https%3A%2F%2Fwww.bilibili.com%2F&first_domain=.bilibili.com",
"refresh_token": "43de156ad241864640f9d9721656a682"
}
}
```
</details>
<details>
<summary>查看响应头部示例:</summary>
```http
HTTP/2 200 OK
date: Thu, 15 Aug 2024 09:10:09 GMT
content-type: application/json; charset=utf-8
access-control-allow-credentials: true
access-control-allow-methods: GET,POST,PUT,DELETE
access-control-allow-origin: https://passport.bilibili.com
bili-status-code: 0
bili-trace-id: 175262647666bdc5
set-cookie: SESSDATA=xxxxxxx; Path=/; Domain=bilibili.com; Expires=Tue, 11 Feb 2025 09:10:09 GMT; HttpOnly; Secure
set-cookie: bili_jct=xxxxxxxxxxxxxxxxxxxxxxxxx; Path=/; Domain=bilibili.com; Expires=Tue, 11 Feb 2025 09:10:09 GMT
set-cookie: DedeUserID=114514191; Path=/; Domain=bilibili.com; Expires=Tue, 11 Feb 2025 09:10:09 GMT
set-cookie: DedeUserID__ckMd5=0123456789abcdef; Path=/; Domain=bilibili.com; Expires=Tue, 11 Feb 2025 09:10:09 GMT
set-cookie: sid=xxxxxxxx; Path=/; Domain=bilibili.com; Expires=Tue, 11 Feb 2025 09:10:09 GMT
vary: Origin
x-bili-trace-id: 60f0305e2abc511d175262647666bdc5
access-control-allow-headers: Origin,No-Cache,X-Requested-With,If-Modified-Since,Pragma,Last-Modified,Cache-Control,Expires,Content-Type,Access-Control-Allow-Credentials,DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Cache-Webcdn,x-bilibili-key-real-ip,x-backend-bili-real-ip,x-risk-header
cross-origin-resource-policy: cross-origin
access-control-expose-headers: X-Bili-Gaia-Vvoucher,X-Bili-Trace-Id
expires: Thu, 15 Aug 2024 09:10:08 GMT
cache-control: no-cache
x-cache-webcdn: BYPASS from blzone01
content-encoding: br
X-Firefox-Spdy: h2
```
</details>

View File

@@ -1,6 +1,6 @@
# 登录操作
人机验证方式登录包含**账号密码登录**与**机短信验证码登录**
人机验证方式登录包含**账号密码登录**与**机短信验证码登录**
**注:扫码登录**不需要进行**人机验证**,故**不使用**以下接口
@@ -16,13 +16,14 @@
2. 进行滑动or点击验证
3. 返回验证结果`validate``seccode`,进行短信或密码登录
### 申请captcha验证码
> https://passport.bilibili.com/x/passport-login/captcha?source=main_web
*请求方式GET*
注: 另外参见 [密码登录-手机号验证-获取 captcha](password.md#获取-captcha)
**json回复**
根对象:
@@ -80,6 +81,71 @@ curl 'https://passport.bilibili.com/x/passport-login/captcha?source=main_web'
</details>
### 申请captcha验证码 (旧版)
> http://passport.bilibili.com/web/captcha/combine
*请求方式GET*
该接口曾从文档移除过, 经过测试仍可正常使用
**URL参数:**
| 参数名 | 类型 | 内容 | 必要性 | 备注 |
| ------ | ---- | ------------ | ------ | ---- |
| plat | num | 平台类型 | 必要 | 默认为 6 |
**JSON回复:**
根对象:
| 字段 | 类型 | 内容 | 备注 |
| ------ | ---- | -------- | --------- |
| code | num | 返回值 | 0成功 |
| data | obj | 信息本体 | |
`data`对象:
| 字段 | 类型 | 内容 | 备注 |
| -------- | ----- | ------ | -------- |
| result | obj | 套了个娃 | |
| type | num | 1 | **作用尚不明确** |
`result`对象:
| 字段 | 类型 | 内容 | 备注 |
| -------- | ----- | ------ | -------- |
| success | num | 1 | **作用尚不明确** |
| gt | str | 极验id | 一般为固定值 |
| challenge | str | 极验KEY | 由B站后端产生用于人机验证 |
| key | str | 登录秘钥 | 与 captcha 无关, 与登录接口有关, 亦作 token |
**示例:**
```shell
curl 'https://passport.bilibili.com/web/captcha/combine?plat=6'
```
<details>
<summary>查看响应示例:</summary>
```json
{
"code": 0,
"data": {
"result": {
"success": 1,
"gt": "bd111e81eda1cbb9f54425aafc0908ac",
"challenge": "2903a8eb967a1d990444cb23ea42f417",
"key": "76fb59fbd83a4d9d816162c5156fc964"
},
"type": 1
}
}
```
</details>
### 进行验证
本文档为 Bilibili 文档,验证码为 [geetest 极验](https://docs.geetest.com/sensebot/start/) 提供,故不提供相关 API
@@ -92,7 +158,6 @@ curl 'https://passport.bilibili.com/x/passport-login/captcha?source=main_web'
3. 验证完成后点击按钮5生成验证结果
4. 使用最开始获得到的`key``challenge`和刚获得到的`validate``seccode`继续之后的登录操作
### 继续登录
- [短信登录](SMS.md)

View File

@@ -68,3 +68,194 @@ curl -G 'https://api.bilibili.com/x/safecenter/login_notice' \
```
</details>
## 最近一周的登录情况
> https://api.bilibili.com/x/member/web/login/log
*请求方式: GET*
认证方式: Cookie (SESSDATA)
**URL参数:**
| 参数名 | 类型 | 内容 | 必要性 | 备注 |
| ------ | ---- | ---------- | ------ | -------- |
| jsonp | str | 回调函数名? | 非必要 | 默认 jsonp |
| web_location | str | 网页位置? | 非必要 | 默认 333.33 |
**JSON回复:**
根对象:
| 字段 | 类型 | 内容 | 备注 |
| ------- | ---- | -------- | --------- |
| code | num | 返回值 | 0成功<br />-101账号未登录 |
| message | str | 错误信息 | 默认为 0 |
| ttl | num | 1 | |
| data | obj | 信息本体 | |
`data`对象:
| 字段 | 类型 | 内容 | 备注 |
| -------- | ---- | ------------ | ----- |
| count | num | 记录总数 | |
| list | arr | 登录记录列表 | |
`data`中的`list`数组:
| 项 | 类型 | 内容 | 备注 |
| ---- | ---- | -------------- | ---- |
| 0 | obj | 登录记录1 | |
| …… | obj | …… | |
| n | obj | 登录记录(n+1) | |
`list`数组中的对象:
| 字段 | 类型 | 内容 | 备注 |
| -------- | ---- | -------------- | ---- |
| ip | str | 登录 IP | 末两位以 `*` 打码 |
| time | num | 登录时间 | UNIX 秒级时间戳 |
| time_at | str | 登录时间 | 格式为 `yyyy-MM-dd HH:mm:ss` |
| status | bool | 是否登录成功? | |
| type | num | 登录方式? | |
| geo | str | 登录地理位置 | |
**示例:**
查询本用户最近一周的登录情况
```shell
curl -G "https://api.bilibili.com/x/member/web/login/log" \
-b "SESSDATA=xxx"
```
<details>
<summary>查看响应示例:</summary>
```json
{
"code": 0,
"message": "0",
"ttl": 1,
"data": {
"count": 14,
"list": [
{
"ip": "108.181.*.*",
"time": 1722036741,
"time_at": "2024-07-27 07:32:21",
"status": true,
"type": 0,
"geo": "美国加利福尼亚州洛杉矶telus.com"
},
{
"ip": "104.28.*.*",
"time": 1722040653,
"time_at": "2024-07-27 08:37:33",
"status": true,
"type": 0,
"geo": "巴西"
},
{
"ip": "104.28.*.*",
"time": 1721950332,
"time_at": "2024-07-26 07:32:12",
"status": true,
"type": 0,
"geo": "新加坡cloudflare.com"
},
{
"ip": "104.28.*.*",
"time": 1721964627,
"time_at": "2024-07-26 11:30:27",
"status": true,
"type": 0,
"geo": "美国弗吉尼亚州雷斯顿cloudflare.com"
},
{
"ip": "143.92.*.*",
"time": 1721861861,
"time_at": "2024-07-25 06:57:41",
"status": true,
"type": 0,
"geo": "中国香港特别行政区"
},
{
"ip": "143.92.*.*",
"time": 1721861855,
"time_at": "2024-07-25 06:57:35",
"status": true,
"type": 0,
"geo": "中国香港特别行政区"
},
{
"ip": "104.28.*.*",
"time": 1721709514,
"time_at": "2024-07-23 12:38:34",
"status": true,
"type": 0,
"geo": "日本千叶县成田市cloudflare.com"
},
{
"ip": "104.28.*.*",
"time": 1721709618,
"time_at": "2024-07-23 12:40:18",
"status": true,
"type": 0,
"geo": "日本千叶县成田市cloudflare.com"
},
{
"ip": "143.92.*.*",
"time": 1721636125,
"time_at": "2024-07-22 16:15:25",
"status": true,
"type": 0,
"geo": "中国香港特别行政区"
},
{
"ip": "143.92.*.*",
"time": 1721636111,
"time_at": "2024-07-22 16:15:11",
"status": true,
"type": 0,
"geo": "中国香港特别行政区"
},
{
"ip": "104.28.*.*",
"time": 1721539870,
"time_at": "2024-07-21 13:31:10",
"status": true,
"type": 0,
"geo": "美国加利福尼亚州东洛杉矶cloudflare.com"
},
{
"ip": "104.28.*.*",
"time": 1721539965,
"time_at": "2024-07-21 13:32:45",
"status": true,
"type": 0,
"geo": "美国加利福尼亚州东洛杉矶cloudflare.com"
},
{
"ip": "42.2.*.*",
"time": 1721477962,
"time_at": "2024-07-20 20:19:22",
"status": true,
"type": 0,
"geo": "中国香港特别行政区pccw.com"
},
{
"ip": "42.2.*.*",
"time": 1721477960,
"time_at": "2024-07-20 20:19:20",
"status": true,
"type": 0,
"geo": "中国香港特别行政区pccw.com"
}
]
}
}
```
</details>

View File

@@ -660,4 +660,197 @@ curl 'https://api.bilibili.com/x/member/web/sign/update' \
</details>
## 最近一周的经验记录
> https://api.bilibili.com/x/member/web/exp/log
*请求方式: GET*
认证方式: Cookie (SESSDATA)
**URL参数:**
| 参数名 | 类型 | 内容 | 必要性 | 备注 |
| ------ | ---- | ---------- | ------ | -------- |
| jsonp | str | 回调函数名? | 非必要 | 默认 jsonp |
| web_location | str | 网页位置? | 非必要 | 默认 333.33 |
**JSON回复:**
根对象:
| 字段 | 类型 | 内容 | 备注 |
| ------- | ---- | -------- | ---- |
| code | num | 返回值 | 0: 成功<br />-101: 账号未登录 |
| message | str | 错误信息 | 默认为0 |
| ttl | num | 1 | |
| data | obj | 数据本体 | |
`data`对象:
| 字段 | 类型 | 内容 | 备注 |
| ----- | ------ | ---------------- | ---- |
| list | array | 经验记录条目列表 | |
| count | num | 经验记录条目数 | |
`data`中的`list`数组:
| 项 | 类型 | 内容 | 备注 |
| ---- | ---- | ----- | ---- |
| 0 | obj | 记录1 | |
| …… | obj | …… | …… |
| n | obj | 记录(n+1) | |
`list`数组中的对象:
| 字段 | 类型 | 内容 | 备注 |
| ------ | ---- | -------- | ---- |
| delta | num | 经验值 | |
| time | str | 记录时间 | 格式为 yyyy-MM-dd HH:mm:ss |
| reason | str | 记录原因 | |
**示例:**
```shell
curl -G "https://api.bilibili.com/x/member/web/exp/log" \
-b "SESSDATA=xxx
```
<details>
<summary>查看响应示例:</summary>
```json
{
"code": 0,
"message": "0",
"ttl": 1,
"data": {
"list": [
{
"delta": 5,
"time": "2024-07-27 15:08:23",
"reason": "分享视频奖励"
},
{
"delta": 5,
"time": "2024-07-27 08:28:21",
"reason": "登录奖励"
},
{
"delta": 5,
"time": "2024-07-27 08:28:21",
"reason": "观看视频奖励"
},
{
"delta": 5,
"time": "2024-07-26 12:44:19",
"reason": "登录奖励"
},
{
"delta": 5,
"time": "2024-07-26 12:44:19",
"reason": "观看视频奖励"
},
{
"delta": 20,
"time": "2024-07-25 06:58:49",
"reason": "视频投币奖励"
},
{
"delta": 5,
"time": "2024-07-25 06:58:30",
"reason": "观看视频奖励"
},
{
"delta": 5,
"time": "2024-07-25 06:58:30",
"reason": "登录奖励"
},
{
"delta": 5,
"time": "2024-07-23 18:47:48",
"reason": "观看视频奖励"
},
{
"delta": 5,
"time": "2024-07-23 18:47:48",
"reason": "登录奖励"
}
],
"count": 10
}
}
```
</details>
## 最近一周的节操记录
> https://api.bilibili.com/x/member/web/moral/log
*请求方式: GET*
认证方式: Cookie (SESSDATA)
**URL参数:**
| 参数名 | 类型 | 内容 | 必要性 | 备注 |
| ------ | ---- | ---------- | ------ | -------- |
| jsonp | str | 回调函数名? | 非必要 | 默认 jsonp |
| web_location | str | 网页位置? | 非必要 | 默认 333.33 |
**JSON回复:**
根对象:
| 字段 | 类型 | 内容 | 备注 |
| ------- | ---- | -------- | ---- |
| code | num | 返回值 | 0: 成功<br />-101: 账号未登录 |
| message | str | 错误信息 | 默认为0 |
| ttl | num | 1 | |
| data | obj | 数据本体 | |
`data`对象:
| 字段 | 类型 | 内容 | 备注 |
| ----- | ------ | ---------------- | ---- |
| moral | num | 节操值 | |
| list | array | 记录条目列表 | |
| count | num | 记录条目数 | |
`data`中的`list`数组:
| 项 | 类型 | 内容 | 备注 |
| ---- | ---- | ----- | ---- |
| 0 | obj | 记录1 | |
| …… | obj | …… | …… |
| n | obj | 记录(n+1) | |
`list`数组中的对象:
*表现良好暂时没有记录, 欢迎封号斗罗前来补充*
**示例:**
```shell
curl -G "https://api.bilibili.com/x/member/web/moral/log" \
-b "SESSDATA=xxx
```
<details>
<summary>查看响应示例:</summary>
```json
{
"code": 0,
"message": "0",
"ttl": 1,
"data": {
"moral": 70,
"list": [],
"count": 0
}
}
```
</details>