AI Actions
Authentication
Secure your API calls and actions
When your AI needs to access secure APIs or private data, it needs proper authentication. There are two ways to handle this:
1. Dynamic Authentication (Via Widget)
Best for user-specific access where each user has their own credentials.
Use this when:
- Users need to be authenticated
- Each user has different permissions
- You’re using JWTs or session tokens
- You need to pass user-specific API keys
2. Static Authentication (Via Dashboard)
Best for system-wide credentials that all users share.
1
Open Dashboard
Navigate to your copilot’s settings
2
Add Headers
Under “Global variables/headers”, add your authentication:
- API keys
- Bearer tokens
- Basic auth credentials
Use this when:
- All users need the same access level
- You’re using system-wide API keys
- You don’t want to expose credentials in frontend code
- You need consistent authentication for all requests
Security Best Practices
Widget Headers
- Never stored on our servers
- Used only during request
- Perfect for user tokens
Dashboard Headers
- Encrypted at rest
- Stored securely
- Best for system credentials
Example Use Cases
User-Specific Access
System-Wide API Access
Mixed Authentication
Security Tips:
- Use dashboard authentication for sensitive credentials
- Use widget headers for user-specific tokens
- Never expose system-wide API keys in frontend code
- Always use HTTPS for API calls
Need help? Check our security guide or join our Slack community.
Was this page helpful?