Reference for creating and managing n8n credentials, OAuth2 flows, and security.
Credentials in n8n store authentication details (API keys, tokens, OAuth2 grants) that nodes use to connect to external services. They are encrypted at rest and decoupled from workflows, so updating a credential automatically applies to every workflow that references it.
Tip
Name credentials descriptively (e.g., "Production Slack Bot" vs "Slack") to avoid confusion when multiple credentials exist for the same service.
The simplest method. Paste an API key or token from the third-party service into the credential form. n8n sends it in the header, query string, or body as the service requires.
n8n handles the full OAuth2 authorization code flow:
Note
The OAuth2 callback URL must be registered in the external service's app settings. n8n displays the correct callback URL in the credential form.
| Type | Examples |
|---|---|
| Basic Auth | Username and password sent as an HTTP Basic header |
| Header Auth | Custom header name and value |
| Digest Auth | Challenge-response authentication |
| Query Auth | Credentials sent as URL query parameters |
| Session-based | Cookie-based login flow (less common) |
Credentials can be shared with other users on the same n8n instance:
Warning
Shared credentials expose access to the underlying service. Only share with users who should have that level of access.
N8N_ENCRYPTION_KEY). Back up this key -- without it, saved credentials cannot be decrypted.Related tips: Security Best Practices, Integration Patterns
I build production n8n and Cloudflare automation for teams — the same engineering behind HarperFlow. Fixed-price, escrow-protected, US-based.