Bearer Token
All Client API routes require authentication via Bearer token in theAuthorization HTTP header.
How to get your token
The access token is obtained through the PixUs Global platform’s Better Auth authentication flow. Contact support to get your API credentials.Using the token
Include theAuthorization header in all requests:
Token resolution
The system resolves the token in the following order:- Local cache — in-memory check for recent tokens
- Redis — distributed cache with 15-second TTL
- Database — full session validation via Better Auth
Authentication errors
| Code | Description |
|---|---|
401 | Missing, invalid, or expired token |
403 | Valid token, but no permission for the resource |
401 Response
Best practices
- Store the token securely (never in source code)
- Renew the token before expiration
- Use HTTPS for all requests (HTTP will be rejected)
- Do not share tokens between environments (production/staging)