Authentication
The Collate API uses JWT (JSON Web Token) authentication. All API requests must include a valid token in theAuthorization header.
Obtaining a Token
There are two ways to obtain an API token:Bot Token (Recommended for Automation)
Bot tokens are ideal for service accounts, CI/CD pipelines, and automated integrations.- Navigate to Settings > Bots in the Collate UI
- Click Add Bot or select an existing bot
- Under Token, click Generate Token
- Copy and securely store the generated JWT token
Personal Access Token
Personal access tokens are tied to your user account and inherit your permissions.- Click your profile icon in the top-right corner
- Select Access Tokens
- Click Generate New Token
- Set an expiration date and click Generate
- Copy and securely store the token
Personal access tokens cannot be retrieved after creation. Store them securely immediately after generation.
Using the Token
Include the token in theAuthorization header of all API requests:
Examples
Token Example
Token Structure
Collate JWT tokens contain the following claims:| Claim | Description |
|---|---|
sub | Subject - username or bot name |
iss | Issuer - open-metadata.org |
roles | Array of assigned roles |
email | User or bot email |
isBot | Boolean indicating if token is for a bot |
tokenType | BOT or PERSONAL_ACCESS |
iat | Issued at timestamp |
exp | Expiration timestamp (null for non-expiring bot tokens) |
Authentication Errors
| Error | Status Code | Description |
|---|---|---|
| Missing token | 401 | No Authorization header provided |
| Invalid token | 401 | Token is malformed or signature invalid |
| Expired token | 401 | Token has passed its expiration time |
| Insufficient permissions | 403 | Token lacks required role/permission |
Error Response Format
Security Best Practices
Use Bot Tokens for Automation
Create dedicated bot accounts for each integration rather than using personal tokens.
Rotate Tokens Regularly
Set expiration dates on personal access tokens and rotate bot tokens periodically.
Store Tokens Securely
Use environment variables or secret managers. Never commit tokens to source control.
Environment Variables
For convenience, you can configure authentication using environment variables:SSO Integration
Collate supports SSO authentication providers for the UI. For API access, you still need to use JWT tokens, but users authenticated via SSO can generate personal access tokens from their profile. Supported SSO providers:- Okta
- Azure AD
- Auth0
- Custom OIDC
- SAML
- LDAP
SSO Configuration
Configure Single Sign-On for your organization