mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-08 09:10:11 +08:00
1.1 KiB
1.1 KiB
mirai-api-http
Mirai-API-http provides adapter for ALL langugae to access mirai via HTTP protocol.Start Session-Authorize
Path: /auth
Method: POST
this verify your session to one bot and you could have full access to that bot
NOTE that only 1 bot could be control under 1 session, you could have multiple session to control all bots.
Request:
name | type | optional | example | note |
---|---|---|---|---|
key | String | false | U9HSaDXl39ksd918273hU | MIRAI API HTTP key, this could be found after initialize |
String | false | 1040400290 | bot QQ number you want to access |
Response:
name | type | example | note |
---|---|---|---|
success | Boolean | true | if this session is authorized |
session | String | UANSHDKSLAOISN | your session key |
without session key, you are not able to access any method below.
session key should be attached to your cookies 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.