Authentication Methods
Tydli supports all standard API authentication methods. Here’s how to configure each one for your MCP deployments.API Key Authentication
The simplest authentication method. Your API key is sent with every request, typically in a header.When to Use
- Simple REST APIs without complex auth flows
- Internal APIs with static keys
- Services like Stripe, SendGrid, OpenAI
Configuration Example
Common Header Names
X-API-KeyAuthorization: Bearer <token>X-Auth-Tokenapi-key
Example Services
- Stripe: Uses
Authorization: Bearer sk_live_... - SendGrid: Uses
Authorization: Bearer SG.xxx - OpenAI: Uses
Authorization: Bearer sk-...
OAuth 2.0
Industry-standard protocol for secure authorization. Allows temporary, scoped access without sharing passwords.When to Use
- APIs that require user authorization (Google, GitHub, Salesforce)
- When you need different permission levels
- Production applications handling user data
Configuration Fields
client_id: Your application identifierclient_secret: Your application secret keytoken_url: Endpoint to exchange code for tokenscope: Requested permissions (optional)
Example Configuration
How Tydli Handles OAuth
Token Refresh: Tydli handles token refresh automatically. Just provide initial credentials and we manage the rest. Secure Storage: OAuth credentials are encrypted and never exposed to end users. Automatic Renewal: Tokens are refreshed before expiration to ensure uninterrupted service.Basic Authentication
Simple username and password authentication. Credentials are base64-encoded and sent in the Authorization header.When to Use
- Legacy or internal APIs
- Simple services without OAuth support
- Development and testing environments
Configuration Example
Security Note
Always use Basic Auth over HTTPS. Tydli encrypts your credentials at rest and in transit.Custom Headers
For APIs with proprietary authentication schemes or additional required headers.When to Use
- APIs with custom authentication schemes
- Services requiring multiple authentication headers
- Special tracking or versioning headers
Example Use Cases
Multiple auth tokens:Security Best Practices
Tydli implements multiple layers of security for your API credentials:Encryption at Rest
- All credentials are encrypted using AES-256 encryption
- Stored securely in encrypted database fields
- Never accessible in plain text
Server-Side Execution
- API requests are made server-side, never exposing credentials to clients
- Credentials never sent to browsers or client applications
- All requests proxied through Tydli’s secure infrastructure
Credential Management
- Credentials are never logged or displayed after initial setup
- Masked in all UI displays
- Automatic credential rotation support
Environment Best Practices
- Use environment-specific credentials (dev, staging, production)
- Implement different keys for different deployment stages
- Test with sandbox credentials before production
Rotation & Monitoring
- Rotate API keys regularly according to your security policy
- Monitor your Tydli deployment logs for unauthorized access attempts
- Set up alerts for suspicious authentication patterns
Least Privilege
- Use scoped permissions when possible (OAuth scopes, API key permissions)
- Grant only the minimum access required for your use case
- Regularly audit and remove unused credentials
Troubleshooting Authentication
401 Unauthorized Errors
Possible causes:- Incorrect API key or token
- Expired OAuth token
- Wrong header name or format
- Verify credentials are correctly entered
- Check if token has expired (OAuth tokens)
- Confirm header name matches API requirements
403 Forbidden Errors
Possible causes:- Valid credentials but insufficient permissions
- IP address restrictions
- Rate limiting
- Check API key scopes/permissions
- Verify your IP is allowed (if API has IP restrictions)
- Review rate limit status
Next Steps
- Review Best Practices for security recommendations
- Learn about Rate Limits and quotas
- Check Troubleshooting Guide for common auth issues
- Explore OAuth Integration Guide for detailed OAuth setup