How to Use Your Agent’s Access Token in Optimly
Introduction
Every agent you create in Optimly comes with a unique access token. This token is your key to unlocking integrations, automations, and direct API access—giving you the power to connect your agent to any workflow, app, or platform.
🎬 Watch the Full Video Guide
Prefer to learn visually? Watch our step-by-step tutorial on YouTube:
This video covers everything in this article, with live demos and extra tips for developers and business users.
Where to Find Your Access Token
- Log in to your Optimly dashboard.
- Select your agent from the list.
- Look for the token icon or the Integrations tab—your access token will be displayed there.
Tip: Each agent has its own token. Keep it secure and never share it publicly.
Three Ways to Use Your Agent
1. Test Interface
Use the built-in test console inside the agent dashboard to simulate conversations and see real-time responses.
2. Public Link
Share your agent with anyone using its public page. Find the link in your dashboard and send it to teammates or customers.
3. Third-party Integration
Go to the Integrations tab in your agent’s settings. Choose your preferred format:
- Website embed: Copy the provided code snippet and paste it into your site.
- React app: Use the ready-to-go config for React projects.
- WhatsApp & more: Follow the guided steps for messaging platforms. The access token is already included in the config.
Direct API Access
For full control, you can call the Optimly API directly. Just include your agent’s access token in the Authorization
header:
curl -X POST https://api.optimly.io/v1/agents/{agent_id}/message \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"message": "Hello!"}'
Check the Optimly API docs for more endpoints and usage examples.
- API Quick Reference: External API Quick Reference
- Full API Docs: Optimly API Documentation
- SDKs & Examples: GitHub Integration Examples
Integration Guides & Advanced Use Cases
- Website Integration: Website Integration Guide
- React & Vue Components: React Example | Vue Example
- WhatsApp & Messaging: WhatsApp Integration
- Lead Forms & Appointments: Tools & Automation
Best Practices & Security Tips
-
Keep your token secret. Never expose it in public repos or client-side code.
-
Rotate tokens if you suspect compromise.
-
Use environment variables for server-side integrations.
-
Authentication Guide: API Authentication
-
Security Best Practices: Website Integration Security
Support & Community
- Official Docs: docs.optimly.io
- Live Chat: optimly.io
- Discord Community: Join Discord
- Email Support: contact@optimly.io
Conclusion & Next Steps
Your agent’s access token unlocks powerful integrations and total flexibility. Ready to build? Read the docs or create your first agent today.
- Try the API: API Quick Start
- See More Examples: Integration Examples
- Read the Docs: docs.optimly.io