Authentication
Authentication
PrintBase 支持两种鉴权:
- User JWT:用于 Console/Web 登录态
- API Key(
pb_live_*):用于后端系统调用
User JWT 接口
POST /v1/auth/registerPOST /v1/auth/loginGET /v1/auth/mePOST /v1/auth/email/verification/sendPOST /v1/auth/email/verification/confirm
新注册用户会返回 email_verified: false。使用 User JWT 请求发送验证邮件,然后把邮件链接里的 token 提交到确认接口完成邮箱验证。
请求头
Authorization: Bearer <TOKEN_OR_API_KEY>Scope 权限
常用 scopes:
api_keys:readapi_keys:writeprinters:readcomputers:readprint:readprint:create