Skip to content

AI 盒子 API 接口说明文档

用户登录

/getToken

用户登录鉴权接口

{
    "name": "admin",
    "password": "password"
}

Status: 200

{
    "message": "Authenticated",
    "success": true,
    "token": "eyhjkllkkda99987678sdf"
}

用户注册

/register

新用户注册接口

{
    "name": "admin",
    "password": "password",
    "email": "xxx@tjai.com",
    "regcode": "REDCODE"
}

Status: 200

{
    "message": "New user registered",
    "success": true,
}

Status: 400

{
    "message": "User already existed",
    "success": false,
}

license 验证

/auth

验证设备证书有效性 证书用非对称加密

{
    "name": "license",
    "password": "<generated license>",
}

Status: 200

{
    "message": "Token generated",
    "success": true,
    "token": "<generated jwt for later use>"
}

Status: 401

{
    "message": "Unauthorized",
    "success": false,
}