Bearer Token
All Unwall API requests require a bearer token in theAuthorization header. Tokens are project-scoped and prefixed with aw_live_.
Permissions
Tokens carry independent permission scopes. Only grant the permissions your agent actually needs.
When creating a token, select only the permissions required:
Rate Limits
Agent API tokens are rate-limited to 100 requests per minute using a sliding window. When the limit is exceeded, the API returns a429 Too Many Requests response with a Retry-After header indicating how many seconds to wait.
Error Responses
Example error response
Security Best Practices
Store tokens in environment variables
Store tokens in environment variables
Never hard-code tokens in source code or commit them to version control. Use environment variables or a secrets manager like AWS Secrets Manager, HashiCorp Vault, or your platform’s built-in secret store.
Use least-privilege permissions
Use least-privilege permissions
Only grant the permissions your agent actually needs. A monitoring agent should have
read only. A payment agent might need read + pay. Only grant x402 to agents that call x402-enabled APIs.Rotate tokens regularly
Rotate tokens regularly
Create new tokens and revoke old ones on a regular cadence. You can have multiple active tokens per project, making zero-downtime rotation straightforward.
Set token expiry
Set token expiry
When creating tokens, set an expiration date for short-lived use cases. Expired tokens are automatically rejected without needing manual revocation.