Credentials in n8n
From the n8n cheat sheet · Core Concepts · verified Jul 2026
Credentials
Managing authentication for external services
bash
# Credential Types
- OAuth2: Auto token refresh (Authorization Code, Client Credentials)
- API Key: Header Auth, Query Param, Custom Header
- Basic Auth: Username + Password (Base64 encoded)
- JWT: JSON Web Token validation
# Common Auth Headers
Authorization: Bearer TOKEN
X-API-Key: YOUR_KEY🔐 All credentials encrypted at rest with AES256
💡 Prefer OAuth2 over API keys for auto token refresh
⚠️ Never hardcode secrets in Code nodes or expressions
🎯 Rotate credentials regularly for security