XFE Git
XFE Studio Git
Git 首页 全局搜索
XFE 主站 文档 NuGet
公开
关注 0 Fork 0 Star 0
返回提交历史

XFEstudio/bilibili-API-collect

用户注册 (#265)

dbfd712
暮光小猿wzt <kuresaru@scraft.top>
提交于

代码差异

2 个文件 +89 -0
Modified README.md +1 -0
@@ -67,6 +67,7 @@ PS:所有http协议地址均可使用https,文档中为了统一写作`http`
67 67 - [关系](user/relation.md)√
68 68 - [个人空间](user/space.md)x
69 69 - [检查昵称是否可注册](user/check_nickname.md)√
70 - [用户注册](user/register.md)
70 71 - [视频](video)
71 72 - [视频分区一览(分区代码)](video/video_zone.md)√
72 73 - [基本信息](video/info.md)√
Added user/register.md +88 -0
@@ -0,0 +1,88 @@
1 # 用户注册
2
3 ## 0. 检查昵称是否可注册(可选)
4
5 [检查昵称是否可注册(可选)](check_nickname.md)
6
7
8 ## 1. 完成人机验证
9
10 [完成人机验证(参考验证登录)](../login/login_action/readme.md#验证登录)
11
12 完成后得到`key`, `challenge`, `validate`, `seccode`四个参数
13
14
15 ## 2. 发送短信验证码
16
17 [发送短信验证码(参考短信登录)](../login/login_action/SMS.md#发送短信验证码(web端))
18
19 **注意不同的是这里type=1而非21**,推测此参数决定短信内容
20
21 <details>
22 <summary>查看示例</summary>
23
24 ```bash
25 curl 'https://passport.bilibili.com/web/sms/general/v2/send' \
26 -X POST \
27 -H 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:93.0) Gecko/20100101 Firefox/93.0' \
28 -H 'Referer: https://passport.bilibili.com/register/phone.html' \
29 -H 'Content-Type: application/x-www-form-urlencoded' \
30 --data-raw 'key=6eeb28e7bbd64b389da2be3a2778c7e3&captchaType=6&type=1&cid=1&tel=13888888888&challenge=c52148f88a28b6011db52bb213483ee8&validate=a98841cd6ea58e1b1f5783fca73cddb6&seccode=a98841cd6ea58e1b1f5783fca73cddb6%7Cjordan'
31 ```
32
33 ```json
34 {"code":0,"message":"验证码短信已下发"}
35 ```
36
37 </details>
38
39 ## 3. 提交注册请求
40
41 > http://passport.bilibili.com/web/reg/tel
42
43 *请求方式:POST*
44
45 **正文参数( application/x-www-form-urlencoded ):**
46
47 | 参数名 | 类型 | 内容 |
48 | --- | --- | --- |
49 | nickName | str | 昵称 |
50 | code | num | 短信验证码 |
51 | pwd | str | 密码 |
52 | gourl | str | 注册成功跳转地址 |
53 | tel | num | 手机号码 |
54 | cid | num | 1 |
55 | plat | num | 0 |
56
57 **json回复:**
58
59 根对象:
60
61 | 字段 | 类型 | 内容 | 备注 |
62 | ------ | ---- | -------- | --------- |
63 | code | num | 返回值 | 0:成功<br>1005:验证码错误<br>1007:验证码过期 |
64 | data | obj | 成功信息 | 只在成功时存在 |
65 | message | str | 错误信息 | 只在错误时存在 |
66
67 成功信息
68
69 | 字段 | 类型 | 内容 | 备注 |
70 | ------ | ---- | -------- | --------- |
71 | redirectUrl | str | 跳转链接 | 不确定是否有用 |
72 | hint | str | "注册成功" | 成功后不提示成功还能提示什么? |
73 | in_reg_audit | num | 0 | 未知 |
74
75 <details>
76 <summary>查看示例</summary>
77
78 ```bash
79 curl 'https://passport.bilibili.com/web/reg/tel' \
80 -X POST \
81 -H 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:93.0) Gecko/20100101 Firefox/93.0' \
82 -H 'Accept: application/json, text/plain, */*' \
83 -H 'Referer: https://passport.bilibili.com/register/phone.html' \
84 -H 'Content-Type: application/x-www-form-urlencoded' \
85 --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'
86 ```
87
88 <details>