If your credentials are not working in n8n, it usually means there's a problem with how authentication is configured or how the credentials are being used in your workflow. Here's a complete troubleshooting guide to help you fix credential issues step by step:
❌ Why Your Credentials Might Not Be Working in n8n
🔑 1. Invalid or Expired API Keys / Tokens
Symptoms:
401 Unauthorized
403 Forbidden
- "Invalid credentials" or similar API error
Fix:
- Recheck the API key/token value in Credential Manager.
- Try re-authenticating the service (especially for OAuth-based connections).
- Test the token directly using curl or Postman to confirm it still works.
🔄 2. OAuth Credentials Not Refreshed or Misconfigured
Symptoms:
- OAuth popup fails to load
- Token expired
- No access after reconnect
Fix:
- Verify:
- Redirect URI is set correctly in the 3rd-party service (e.g., Google, Notion)
- Use:
https://<your-n8n-domain>/rest/oauth2-credential/callback
- Scopes are properly configured
- You’re using the correct OAuth2 Credential type in n8n
- Recreate the credential and go through the OAuth flow again
🧩 3. Wrong Credential Selected in the Node
Symptoms:
- Node doesn’t connect despite credentials being present
Fix:
- Open the node (e.g., HTTP, Gmail)
- Make sure the correct credential name is selected in the dropdown
- Check if that credential is valid in the Credentials section
🧱 4. Using Environment Variables but They’re Not Loaded
Symptoms:
- n8n loads but credentials don’t seem to work
Fix:
- Make sure your
.env file or Docker environment includes the needed vars:
N8N_BASIC_AUTH_USER=admin
N8N_BASIC_AUTH_PASSWORD=securepassword
N8N_ENCRYPTION_KEY=your-secret-key
- Restart n8n to apply environment changes:
docker restart n8n
🔒 5. Encryption Key Missing or Changed
Symptoms:
- Credentials saved previously are now unreadable or invalid
Fix:
🌐 6. Network or Firewall Blocking the Connection
Symptoms:
- Timeouts
- Connection refused
- “Fetch failed” or similar errors
Fix:
- Ensure your n8n server has access to the third-party service (check with
ping, curl, or logs)
- If behind a proxy, configure
HTTP_PROXY or HTTPS_PROXY in the environment
🐞 7. Service Requires Special Headers or Auth Format
Symptoms:
- Credentials look correct but still rejected
Fix:
- Some APIs require:
Authorization: Bearer <token>
- Basic Auth (
base64(user:pass))
- Custom headers (e.g.,
X-API-KEY)
Use HTTP Request node and manually construct headers if needed.
✅ 8. Credential Was Deleted or Renamed
Symptoms:
- Node says “Credential not found” or is empty
Fix:
- Go to
Credentials tab
- Recreate or relink the correct credential
- Reopen the node and re-select the credential
🧪 Still Not Working?
Here’s what you can do:
- Try the same API call in Postman or terminal to test the credentials directly
- Export the workflow and inspect the credential name in the JSON
- Share the error message you're seeing in the execution log
Would you like to:
- Test your credentials with a specific API (e.g., Gmail, Airtable)?
- Send me the error message, and I’ll walk you through a fix?
Just let me know which service you're working with.