Qingpu Device Tokens
Qingpu device tokens authenticate the browser extension and desktop app when an APay HTTP-only cookie is unavailable. They identify the user for theme API requests; they do not represent a subscription, trial, product, order, tenant, or capability.
Contract
- Tokens use the
qpd_prefix and only their SHA-256 hash is stored inqingpu_device_tokens. - Each user can have at most one active token. A new extension or desktop login revokes the previous token with reason
new-device-login. - Tokens expire after 90 days as a login-security measure. This date is not a membership expiry date.
- Website cookie sessions are independent and are not subject to the single-device restriction.
- Product access is resolved through
/api/qingpu/user-capabilities; issuing or revoking a device token does not change capabilities.
Endpoints
POST /api/qingpu/loginandPOST /api/qingpu/registerreturndeviceTokenmetadata and the one-timerawToken.POST /api/qingpu/device-tokens/verifyverifies the Bearer token.GET /api/qingpu/device-tokensandPOST /api/qingpu/device-tokens/revokerequire a website cookie session and let users inspect or revoke login devices.
When another device logs in, the old client receives 401 Unauthorized on its next authenticated request and must return to the login screen.