Skip to main content

One post tagged with "Security"

Token safety, authentication, best practices

View All Tags

How to Use Your Agent’s Access Token in Optimly

· 2 min read
CEO @ Optimly

Optimly Banner

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:

How to Use Your Agent’s Access Token in Optimly

This video covers everything in this article, with live demos and extra tips for developers and business users.


Where to Find Your Access Token

  1. Log in to your Optimly dashboard.
  2. Select your agent from the list.
  3. 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.

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.


Integration Guides & Advanced Use Cases


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


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.

Optimly Footer Banner