2020-03-22 15:21:09 +08:00
|
|
|
|
# 充电留言
|
|
|
|
|
|
2020-11-20 20:13:12 +08:00
|
|
|
|
- [发送充电留言](#发送充电留言)
|
|
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
|
|
## 发送充电留言
|
|
|
|
|
|
2020-04-08 16:20:28 +08:00
|
|
|
|
> http://api.bilibili.com/x/ugcpay/trade/elec/message
|
2020-03-22 15:21:09 +08:00
|
|
|
|
|
2020-07-14 18:44:44 +08:00
|
|
|
|
*请求方式:POST*
|
2020-03-22 15:21:09 +08:00
|
|
|
|
|
2020-07-18 23:56:10 +08:00
|
|
|
|
认证方式:Cookie(SESSDATA)
|
2020-03-22 15:21:09 +08:00
|
|
|
|
|
2020-06-08 22:44:46 +08:00
|
|
|
|
**正文参数( application/x-www-form-urlencoded ):**
|
2020-03-22 15:21:09 +08:00
|
|
|
|
|
2020-07-09 16:34:50 +08:00
|
|
|
|
| 参数名 | 类型 | 内容 | 必要性 | 备注 |
|
|
|
|
|
| -------- | ---- | ------------------------ | ------ | ---- |
|
|
|
|
|
| order_id | str | 留言token | 必要 | |
|
|
|
|
|
| message | str | 留言内容 | 必要 | |
|
|
|
|
|
| csrf | str | CSRF Token(位于cookie) | 必要 | |
|
2020-03-22 15:21:09 +08:00
|
|
|
|
|
|
|
|
|
**json回复:**
|
|
|
|
|
|
2020-04-16 18:47:19 +08:00
|
|
|
|
根对象:
|
|
|
|
|
|
2020-03-22 15:21:09 +08:00
|
|
|
|
| 字段 | 类型 | 内容 | 备注 |
|
|
|
|
|
| ------- | ---- | -------- | ------------------------------------------------------------ |
|
2020-05-08 18:32:38 +08:00
|
|
|
|
| code | num | 返回值 | 0:成功 <br />-101:账号未登录<br />-111:csrf校验失败<br />-400:请求错误<br />88203:不能重复留言 |
|
2020-03-22 15:21:09 +08:00
|
|
|
|
| message | str | 错误信息 | 默认为0 |
|
2020-07-17 23:50:28 +08:00
|
|
|
|
| ttl | num | 1 | |
|
2020-03-22 15:21:09 +08:00
|
|
|
|
|
2020-04-16 18:47:19 +08:00
|
|
|
|
**示例:**
|
2020-03-22 15:21:09 +08:00
|
|
|
|
|
2020-06-08 22:44:46 +08:00
|
|
|
|
为留言token为`BPRG5CEC3VUPOOANA540`的充电操作,添加了内容为`支持一下大佬`的留言
|
2020-03-22 15:21:09 +08:00
|
|
|
|
|
2020-07-18 23:56:10 +08:00
|
|
|
|
```shell
|
2020-10-16 19:31:41 +08:00
|
|
|
|
curl 'http://api.bilibili.com/x/ugcpay/trade/elec/message' \
|
|
|
|
|
--data-urlencode 'order_id=BPRG5CEC3VUPOOANA540' \
|
|
|
|
|
--data-urlencode 'message=支持一下大佬' \
|
|
|
|
|
--data-urlencode 'csrf=xxx' \
|
2020-07-18 23:56:10 +08:00
|
|
|
|
-b 'SESSDATA=xxx'
|
|
|
|
|
```
|
2020-03-22 15:21:09 +08:00
|
|
|
|
|
2020-08-31 16:37:38 +08:00
|
|
|
|
<details>
|
|
|
|
|
<summary>查看响应示例:</summary>
|
|
|
|
|
|
2020-03-22 15:21:09 +08:00
|
|
|
|
```json
|
|
|
|
|
{
|
|
|
|
|
"code":0,
|
|
|
|
|
"message":"0",
|
|
|
|
|
"ttl":1
|
|
|
|
|
}
|
|
|
|
|
```
|
|
|
|
|
|
2020-08-31 16:37:38 +08:00
|
|
|
|
</details>
|