Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
M
Mirai
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
MyCard
Mirai
Commits
2c0ecbd8
Commit
2c0ecbd8
authored
Dec 17, 2019
by
liujiahua123123
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
readme of HTTP
parent
87e5229c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
51 additions
and
2 deletions
+51
-2
mirai-api-http/README_CH.md
mirai-api-http/README_CH.md
+51
-2
No files found.
mirai-api-http/README_CH.md
View file @
2c0ecbd8
# mirai-api-http
# mirai-api-http
<b>
<b>
Mirai-API-http
provides adapter for ALL langugae to access mirai via HTTP protocol.
<br>
Mirai-API-http
提供HTTP API供所有语言使用mirai
<br>
</b>
</b>
### 开始会话-认证(Authorize)
```
php
路径
:
/
auth
方法
:
POST
```
使用此方法验证你的会话连接, 并将这个会话绑定一个BOT
<br>
注意: 每个会话只能绑定一个BOT.
#### 请求:<br>
| 名字 | 类型 | 可选 | 举例 | 说明 |
| --- | --- | --- | --- | --- |
| key | String |false|U9HSaDXl39ksd918273hU|MIRAI API HTTP key, HTTP API的核心key|
| qq | String |false|1040400290|需要绑定的BOT QQ号|
#### 返回(成功):<br>
| 名字 | 类型 | 举例 | 说明|
| --- | --- | --- | --- |
| success |Boolean |true|是否验证成功|
| session |String |UANSHDKSLAOISN|你的session key|
#### 返回(失败):<br>
| name | type | example|note|
| --- | --- | --- | --- |
| success |Boolean |false|是否验证成功|
| session |String |null|你的session key|
| error |int |0|错误码|
#### 错误码:<br>
| 代码 | 原因|
| --- | --- |
| 0 | 错误的MIRAI API HTTP key |
| 1 | 试图绑定不存在的bot|
session key 是使用以下方法必须携带的
</br>
session key 需要被以cookie的形式上报
<b>
cookies
</b>
:
| name | value |
| --- | --- |
| session |your session key here |
如果出现HTTP 403错误码,代表session key已过期, 需要重新获取
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment