Credentials
Orchka provides a secure credential management system for storing and using API keys, tokens, and authentication details in your workflows.
Overview
Instead of hardcoding sensitive values in your workflow nodes, you can:
- Store credentials securely with AES-256-GCM encryption
- Reference credentials by ID in your nodes
- Credentials are decrypted only during workflow execution
Credentials are scoped to your active organization — switching orgs in the sidebar narrows the list to that org's credentials. See Organizations & Teams for the multi-tenant model.
Credential Types
| Type | Fields | Use Case |
|---|---|---|
| API Key | apiKey | Generic API authentication |
| Basic Auth | username, password | HTTP Basic authentication |
| Bearer Token | token | OAuth/JWT bearer tokens |
| OAuth2 | clientId, clientSecret, accessToken, refreshToken | OAuth2 flows |
| OpenAI | apiKey, organization (optional) | OpenAI API |
| Anthropic | apiKey | Anthropic Claude API |
| Google AI | apiKey | Google Gemini API |
| X | accessToken, refreshToken (optional) | Publish X posts |
accessToken, refreshToken (optional) | Publish LinkedIn posts | |
| Facebook Page | pageAccessToken | Publish Facebook Page posts |
accessToken, refreshToken (optional) | Publish Instagram media | |
| Threads | accessToken, refreshToken (optional) | Publish Threads posts |
| TikTok | accessToken, refreshToken (optional) | Stored only — no TikTok node yet |
| YouTube | accessToken, refreshToken (optional) | Stored only — no YouTube node yet |
accessToken, refreshToken (optional) | Create Pinterest pins | |
accessToken, refreshToken (optional) | Submit Reddit posts | |
| Bluesky | identifier, password, serviceUrl (optional) | Publish Bluesky posts |
| Mastodon | instanceUrl, accessToken | Publish Mastodon statuses |
| Discord | webhookUrl | Send Discord webhook messages |
Creating Credentials
- Navigate to Credentials in the dashboard sidebar
- Click New Credential
- Select the credential type
- Enter a unique name and the required fields
- Click Create
Finding Credentials
The credentials list supports:
- Search by name (partial, case-insensitive)
- Type filter in the toolbar — a dropdown grouped by category
(Generic / AI Providers / Social). Selecting a type writes
?type=…to the URL, so filtered views are shareable. - Scalable pagination with truncation, "X–Y of N" summary, and a "Go to page" popover on the ellipsis
Filtering happens in the database query, not the client.
Using Credentials in Nodes
AI Agent Node
Select a stored credential instead of relying on environment variables:
- Open the AI Agent node settings
- In the Credential dropdown, select your saved credential
- The credential type must match the selected model provider
Model: gpt-4o
Credential: My OpenAI Key (OpenAI type)HTTP Request Node
Use credentials for API authentication:
- Open the HTTP Request node settings
- Set Auth Type to "Credential"
- Select the appropriate credential
Supported credential types for HTTP:
- Bearer Token →
Authorization: Bearer <token> - Basic Auth →
Authorization: Basic <base64> - API Key →
X-API-Key: <key>
Social Media Nodes
Social nodes use dedicated credential types so each platform can validate the fields it needs:
| Node | Credential Type | Notes |
|---|---|---|
| X Post | X | Requires an OAuth user token with post write access |
| LinkedIn Post | Requires permission to publish as the selected member or organization | |
| Facebook Page Post | Facebook Page | Requires a Page access token |
| Instagram Post | Requires Graph API publishing access and an image URL | |
| Threads Post | Threads | Requires Threads API publishing access |
| Discord Message | Discord | Uses an incoming webhook URL |
| Reddit Post | Requires OAuth submit permission | |
| Bluesky Post | Bluesky | Uses handle/DID plus an app password |
| Mastodon Post | Mastodon | Requires instance URL and a token with write:statuses |
| Pinterest Pin | Requires pin creation access |
Testing Credentials
Before using a credential in production:
- Open the credential details
- Click Test Credential
- For AI provider credentials, this validates the API key with the provider
- Generic and social credentials are schema-validated; platform-side permission errors surface when the workflow runs
Security
- Encrypted at rest with AES-256-GCM, using a master key held only in
CREDENTIAL_ENCRYPTION_KEY - Decrypted only during workflow execution, in the worker process
- Secrets are never returned by the API. There is no endpoint that reads a credential back in plaintext — the list and detail views return metadata only
- Access is scoped by organization: a workflow can use a credential only if both belong to the same org. That is what lets teammates share one credential, and what stops a workflow in one org using another org's
- Every create, update, delete and execution-time resolution writes a row to the credential audit log
Environment Setup
Generate an encryption key for your deployment:
# Generate a 32-byte hex key (exactly 64 hex characters)
openssl rand -hex 32Set it as CREDENTIAL_ENCRYPTION_KEY. Three things to know:
- It is validated at boot. A missing or malformed key stops the process starting, rather than failing later when someone opens a credential.
- The web and worker processes must use a byte-identical value. A mismatch does not error — it silently produces credentials that cannot be decrypted.
- Back it up. There is no recovery path and no rotation mechanism: lose the key and every stored credential is permanently unreadable.
Add to your .env:
CREDENTIAL_ENCRYPTION_KEY=your_64_character_hex_key_hereBest Practices
- Use descriptive names - "Production OpenAI" vs "test-key-1"
- Rotate credentials regularly - Update credentials without changing workflows
- Test before deploying - Use the test feature to validate credentials
- One credential per purpose - Easier to track and rotate