Authentication
The Airbyte Embedded API uses a hierarchical authentication system with three types of tokens, each designed for specific use cases and security requirements.
Token types overview
| Token Type | Use Case | Scope | Access Level |
|---|---|---|---|
| Operator Bearer Token | Organization management, template creation | Organization-wide | Full access to organization resources |
| Scoped Token | API integration, programmatic workspace access | Single workspace | Limited to specific workspace |
| Widget Token | Embedded widget integration | Single workspace + origin validation | Limited to specific workspace with CORS protection |
Operator bearer token
The Operator Bearer Token provides full organization-level access and is used for administrative operations.
Use cases
- Creating and managing source templates
- Creating and managing connection templates
- Managing workspaces across the organization
- Generating scoped tokens and widget tokens
- Administrative API operations
Usage
Include the operator token in the Authorization header:
curl https://api.airbyte.ai/api/v1/integrations/templates/sources \
-H 'Authorization: Bearer <your_operator_token>' \
-H 'Content-Type: application/json'
Security best practices
- Never expose operator tokens in client-side code
- Store securely in secrets management system
- Use scoped tokens for end-user operations
- Rotate tokens periodically
- Limit token distribution to trusted administrators only
Scoped token
Scoped tokens provide workspace-level access and are designed for allowing end-users to create and edit sources in their workspace.
Use cases
- API integrations for managing sources within a specific workspace
- Multi-tenant applications with isolated workspaces
Features
- Workspace-scoped access (cannot access other workspaces)
- Automatically creates workspace from a workspace name if it doesn't exist
- Region selection support
- Embedded in JWT with
io.airbyte.auth.workspace_scopeclaim
Generate scoped token
Endpoint
POST https://api.airbyte.ai/api/v1/embedded/scoped-token
Authentication
Requires Operator Bearer Token