修改README,全栈替换http为https

This commit is contained in:
SocialSisterYi
2023-01-17 15:23:59 +08:00
parent c65363496d
commit 69ba9bea19
106 changed files with 747 additions and 732 deletions

View File

@@ -1,88 +1,102 @@
# 用户注册
## 0. 检查昵称是否可注册(可选)
[检查昵称是否可注册(可选)](check_nickname.md)
## 1. 完成人机验证
## 人机验证
[完成人机验证(参考验证登录)](../login/login_action/readme.md#验证登录)
完成后得到`key`, `challenge`, `validate`, `seccode`四个参数
## 2. 发送短信验证码
## 发送短信验证码
[发送短信验证码(参考短信登录)](../login/login_action/SMS.md#发送短信验证码web端)
**注意不同的是这里type=1而非21**,推测此参数决定短信内容
```bash
curl 'https://passport.bilibili.com/web/sms/general/v2/send' \
--data-urlencode 'key=6eeb28e7bbd64b389da2be3a2778c7e3' \
--data-urlencode 'captchaType=6' \
--data-urlencode 'type=1' \
--data-urlencode 'cid=1' \
--data-urlencode 'tel=13888888888' \
--data-urlencode 'challenge=c52148f88a28b6011db52bb213483ee8' \
--data-urlencode 'validate=a98841cd6ea58e1b1f5783fca73cddb6' \
--data-urlencode 'seccode=a98841cd6ea58e1b1f5783fca73cddb6|jordan'
```
<details>
<summary>查看示例</summary>
```bash
curl 'https://passport.bilibili.com/web/sms/general/v2/send' \
-X POST \
-H 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:93.0) Gecko/20100101 Firefox/93.0' \
-H 'Referer: https://passport.bilibili.com/register/phone.html' \
-H 'Content-Type: application/x-www-form-urlencoded' \
--data-raw 'key=6eeb28e7bbd64b389da2be3a2778c7e3&captchaType=6&type=1&cid=1&tel=13888888888&challenge=c52148f88a28b6011db52bb213483ee8&validate=a98841cd6ea58e1b1f5783fca73cddb6&seccode=a98841cd6ea58e1b1f5783fca73cddb6%7Cjordan'
```
```json
{"code":0,"message":"验证码短信已下发"}
{
"code": 0,
"message": "验证码短信已下发"
}
```
</details>
## 3. 提交注册请求
## 提交注册请求
> http://passport.bilibili.com/web/reg/tel
> https://passport.bilibili.com/web/reg/tel
*请求方式POST*
**正文参数( application/x-www-form-urlencoded **
| 参数名 | 类型 | 内容 |
| --- | --- | --- |
| nickName | str | 昵称 |
| code | num | 短信验证码 |
| pwd | str | 密码 |
| gourl | str | 注册成功跳转地址 |
| tel | num | 手机号码 |
| cid | num | 1 |
| plat | num | 0 |
| 参数名 | 类型 | 内容 | 必要性 | 备注 |
| -------- | ---- | ---------------- | ------ | ------------------------------------------------------------ |
| cid | num | 国际冠字码 | 必要 | 可以从 [获取国际冠字码](../login/login_action/SMS.md#获取国际冠字码_web端) 接口中获取 |
| tel | num | 手机号码 | 必要 | |
| code | num | 短信验证码 | 必要 | |
| nickName | str | 昵称 | 必要 | |
| pwd | str | 密码 | 必要 | 密码为明文 |
| plat | num | 0 | 必要 | 平台? |
| gourl | str | 注册成功跳转地址 | 非必要 | 默认为主页`https://www.bilibili.com/` |
**json回复**
根对象:
| 字段 | 类型 | 内容 | 备注 |
| ------ | ---- | -------- | --------- |
| code | num | 返回值 | 0:成功<br>1005:验证码错误<br>1007:验证码过期 |
| data | obj | 成功信息 | 只在成功时存在 |
| message | str | 错误信息 | 只在错误时存在 |
| 字段 | 类型 | 内容 | 备注 |
| ------- | ---- | -------- | ----------------------------------------------- |
| code | num | 返回值 | 0成功<br>1005验证码错误<br>1007验证码过期 |
| message | str | 错误信息 | 成功时无此字段 |
| data | obj | 信息本体 | 只在成功时存在 |
成功信息
`data`对象:
| 字段 | 类型 | 内容 | 备注 |
| ------ | ---- | -------- | --------- |
| redirectUrl | str | 跳转链接 | 不确定是否有用 |
| hint | str | "注册成功" | 成功后不提示成功还能提示什么? |
| in_reg_audit | num | 0 | 未知 |
| 字段 | 类型 | 内容 | 备注 |
| ------------ | ---- | ---------- | ----------------------------- |
| redirectUrl | str | 跳转链接 | |
| hint | str | "注册成功" | 成功后不提示成功还能提示什么? |
| in_reg_audit | num | (?) | |
```bash
curl 'https://passport.bilibili.com/web/reg/tel' \
--data-urlencode 'plat=0' \
--data-urlencode 'cid=1' \
--data-urlencode 'tel=13888888888' \
--data-urlencode 'code=121314' \
--data-urlencode 'nickName=萌系小妹纸わ'
--data-urlencode 'pwd=Password1234' \
--data-urlencode 'gourl=https://www.bilibili.com'
```
<details>
<summary>查看示例</summary>
```bash
curl 'https://passport.bilibili.com/web/reg/tel' \
-X POST \
-H 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:93.0) Gecko/20100101 Firefox/93.0' \
-H 'Accept: application/json, text/plain, */*' \
-H 'Referer: https://passport.bilibili.com/register/phone.html' \
-H 'Content-Type: application/x-www-form-urlencoded' \
--data-raw 'nickName=%E8%90%8C%E7%B3%BB%E5%B0%8F%E5%A6%B9%E7%BA%B8%E3%82%8F&code=121314&pwd=Password1234&gourl=https%3A%2F%2Fpassport.bilibili.com%2Flogin%3Fgourl%3Dhttps%3A%2F%2Fspace.bilibili.com&tel=13888888888&cid=1&plat=0'
```json
{
"code": 0,
"data": {
"redirectUrl": "https://www.bilibili.com",
"hint": "注册成功",
"in_reg_audit": 0
}
}
```
</details>