bilibili-API-collect/docs/wallet/info.md

84 lines
2.5 KiB
Markdown
Raw Normal View History

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
2024-08-21 19:02:39 +08:00
# 基本信息
## 获取用户钱包
> https://pay.bilibili.com/paywallet/wallet/getUserWallet
*请求方法: POST*
认证方式: Cookie (SESSDATA) (注意 `,` `*` 需要 URL 转义)
**正文参数 (application/json):**
| 参数名 | 类型 | 内容 | 必要性 | 备注 |
| ------------ | ---- | -------- | ------ | ---------------------- |
| panelType | num | 面板类型 | 不必要 | 默认为 3 |
| platformType | num | 平台类型 | 必要 | 任意有效数字, 默认为 3 |
| timestamp | num | 当前时间 | 不必要 | UNIX 毫秒时间戳 |
| traceId | num | 追踪 ID | 不必要 | 与 timestamp 值相同 |
| version | str | 版本 | 不必要 | 默认 `1.0` |
**JSON回复:**
根对象:
| 字段 | 类型 | 内容 | 备注 |
| ------- | ---- | -------- | ---- |
| code | num | 返回值 | 0: 成功<br />8006000004: 缺参<br />别的错误码在 errno |
| errno | num | 错误码 | 8006000004: 缺参<br />800501008: 内部错误(传的不是JSON)<br />800501007: 用户未登录 |
| msg | str | 返回信息 | SUCCESS: 成功<br />否则为错误信息 |
| showMsg | str | 显示信息 | 成功时为空 |
| data | obj | 数据本体 | |
| success | bool | 是否成功 | |
`data` 对象:
| 字段 | 类型 | 内容 | 备注 |
| ----------------- | ---- | ----------- | ---- |
| mid | num | 用户 mid | |
| totalBp | num | 总计 B 币 | |
| defaultBp | num | 默认 B 币? | |
| isoBp | num | iOS B 币? | |
| couponBalance | num | 优惠券余额 | |
| availableBp | num | 可用 B 币 | |
| unavailableBp | num | 不可用 B 币 | |
| unavailableReason | str | 不可用原因 | |
| tip | str | 请XXXXX | 请投币?? |
| needShowClassBalance | num | 需要显示类平衡?? | 1 |
**示例:**
```shell
curl -X POST 'https://pay.bilibili.com/paywallet/wallet/getUserWallet' \
--data-raw '{"platformType":"3"}' \
-H 'content-type: application/json' \
-b 'SESSDATA=xxx'
```
<details>
<summary>查看响应示例:</summary>
```json
{
"code": 0,
"errno": 0,
"msg": "SUCCESS",
"showMsg": "",
"data": {
"mid": 616368979,
"totalBp": 0.00,
"defaultBp": 0.00,
"iosBp": 0.00,
"couponBalance": 0,
"availableBp": 0.00,
"unavailableBp": 0,
"unavailableReason": "",
"tip": "请XXXXX",
"needShowClassBalance": 1
},
"success": true
}
```
</details>