Overview
Halo API supports two authentication methods:- Basic Authentication - Username and password
- Bearer Token Authentication - Personal Access Tokens (PAT) or JWT tokens
Most API endpoints require authentication. Public content endpoints may allow unauthenticated access for read operations, but authentication is required for user-specific data or write operations.
Basic Authentication
Basic Authentication uses your Halo username and password. This method is suitable for:- Development and testing
- Server-to-server integrations in trusted environments
- Quick API exploration
How It Works
Basic Authentication requires sending your credentials in theAuthorization header using Base64 encoding:
Example Request
Basic Auth Parameters
The Basic authentication header in the format:
Basic base64(username:password)To create the value:- Combine username and password with a colon:
username:password - Encode the string in Base64
- Prefix with
Basic
Personal Access Tokens (PAT)
Personal Access Tokens are the recommended authentication method for production applications. PATs provide:- Enhanced security - No need to share your password
- Granular permissions - Can be scoped to specific operations
- Easy revocation - Revoke tokens without changing your password
- Audit trails - Track API usage per token
Creating a Personal Access Token
- Log in to your Halo admin dashboard
- Navigate to User Center > Personal Access Tokens
- Click Generate New Token
- Provide a descriptive name for the token
- Set token expiration (optional but recommended)
- Select permissions/scopes for the token
- Click Generate
- Copy and save the token immediately - you won’t be able to see it again
Using Personal Access Tokens
Include the token in theAuthorization header as a Bearer token:
Example Request with PAT
Bearer Token Parameters
The Bearer token header in the format:
Bearer your-tokenThe token can be:- A Personal Access Token (recommended)
- A JWT token from the authentication endpoint
Token Management Best Practices
Security Recommendations
Set Expiration Dates
Always set expiration dates for tokens. For production, use short-lived tokens (30-90 days) and rotate them regularly.
Use Minimal Permissions
Grant tokens only the permissions they need. Don’t use admin tokens for read-only operations.
Monitor Token Usage
Regularly review token usage in your Halo admin dashboard and revoke unused tokens.
Revoking Tokens
If a token is compromised or no longer needed:- Log in to Halo admin dashboard
- Navigate to User Center > Personal Access Tokens
- Find the token in the list
- Click Revoke
- Confirm the revocation
Revoked tokens become invalid immediately. Any API requests using a revoked token will receive a 401 Unauthorized response.
Authentication Errors
Common Error Responses
401 Unauthorized - Missing Authentication
Authorization header in your request.
401 Unauthorized - Invalid Credentials
401 Unauthorized - Invalid Token
403 Forbidden - Insufficient Permissions
Testing Authentication
You can test your authentication credentials with a simple API call:Next Steps
API Overview
Learn about API architecture and versioning
Public APIs
Explore public content APIs
Console APIs
Manage your Halo instance
Extension APIs
Access custom extensions