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
2bdc6274
Commit
2bdc6274
authored
Dec 15, 2019
by
Him188
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
1e5dcb0e
0f2c1f1c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
3 deletions
+35
-3
mirai-api-http/README.md
mirai-api-http/README.md
+35
-3
No files found.
mirai-api-http/README.md
View file @
2bdc6274
...
@@ -5,7 +5,7 @@ Mirai-API-http provides adapter for ALL langugae to access mirai via HTTP protoc
...
@@ -5,7 +5,7 @@ Mirai-API-http provides adapter for ALL langugae to access mirai via HTTP protoc
</b>
</b>
###
#
Start Session-Authorize
### Start Session-Authorize
```
php
```
php
Path
:
/
auth
Path
:
/
auth
...
@@ -14,11 +14,43 @@ Method: POST
...
@@ -14,11 +14,43 @@ Method: POST
this verify your session to one bot and you could have full access to that bot
<br>
this verify your session to one bot and you could have full access to that bot
<br>
NOTE that only 1 bot could be control under 1 session, you could have multiple session to control all bots.
NOTE that only 1 bot could be control under 1 session, you could have multiple session to control all bots.
#### Request:<br>
| name | type | optional|example|note|
| name | type | optional|example|note|
| --- | --- | --- | --- | --- |
| --- | --- | --- | --- | --- |
| key | String |false|U9HSaDXl39ksd918273hU|this could be found after initialize|
| key | String |false|U9HSaDXl39ksd918273hU|
MIRAI API HTTP key,
this could be found after initialize|
| qq | String |false|1040400290|bot QQ number you want to access|
| qq | String |false|1040400290|bot QQ number you want to access|
#### Response if success:<br>
| name | type | example|note|
| --- | --- | --- | --- |
| success |Boolean |true|if this session is authorized|
| session |String |UANSHDKSLAOISN|your session key|
#### Response if failed:<br>
| name | type | example|note|
| --- | --- | --- | --- |
| success |Boolean |false|if this session is authorized|
| session |String |null|your session key|
| error |int |0|error code|
#### Error:<br>
| code | reason|
| --- | --- |
| 0 | wrong MIRAI API HTTP key |
| 1 | unknown bot number |
without session key, you are not able to access any method below.
</br>
session key should be attached to your
<b>
cookies
</b>
like this:
| name | value |
| --- | --- |
| session |your session key here |
if you were getting HTTP error code 403, you should ask for a new 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