ryoii e951ea43ae Fix: Http api README_CH.md 6 ani în urmă
..
src 27b44563ad Merge remote-tracking branch 'origin/master' 6 ani în urmă
EventType_CH.md 24eab8f76c rename EventType_CN.md to EventType_CH.md 6 ani în urmă
README.md 87e5229cbb readme of HTTP 6 ani în urmă
README_CH.md e951ea43ae Fix: Http api README_CH.md 6 ani în urmă
build.gradle.kts 4b9900e0bd base framework 6 ani în urmă

README.md

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
qq String false 1040400290 bot QQ number you want to access

Response if success:

name type example note
success Boolean true if this session is authorized
session String UANSHDKSLAOISN your session key

Response if failed:

name type example note
success Boolean false if this session is authorized
session String null your session key
error int 0 error code

Error:

code reason
0 wrong MIRAI API HTTP key
1 unknown bot number

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.