Getting Started
Connect Your Website
Verify domain ownership, configure CORS headers, and establish bidirectional web socket connections.
Overview
To prevent unauthorized third-party sites from using your Asiyst project credentials and AI quota, Asiyst requires domain verification before accepting production client sessions.
Step 1: Add Allowed Domains
- Go to your Project settings in the dashboard.
- Navigate to Connect Site -> Allowed Domains.
- Enter your active domains:
- For local development:
http://localhost:3000orhttp://127.0.0.1:5173- For staging:
https://staging.yourdomain.com- For production:
https://yourdomain.comandhttps://www.yourdomain.com
Wildcard subdomains (*.yourdomain.com) are supported on Pro and Enterprise tiers.
Step 2: Embed the SDK
Inject your project ID into the client code on the verified domain:
import { Asiyst } from "@asiyst/sdk";
Asiyst.init({
projectId: "proj_9f8a2b3c4d",
publicKey: "pk_live_8e7d6c5b4a3f2e1d",
});
Step 3: Domain Verification
Asiyst performs an automatic runtime verification check when the SDK sends its first handshake request. When the HTTP Origin or Referer header matches an authorized domain, the server marks the domain status as Verified (Active).
For high-security setups, you can optionally verify ownership via DNS TXT record:
- Record Type:
TXT
- Host:
_asiyst-verify.yourdomain.com
- Value:
asiyst-site-verification=proj_your_project_id
Troubleshooting Connection
If your connection fails with 403 Forbidden (Origin Mismatch):
- Verify there are no trailing slashes in your allowed domain URL list.
- Check that the scheme (
http://vshttps://) exactly matches the browser URL.
Next: Configure Your First Assistant.