CustomDomain Docs
Quickstart

2. Mint tokens

Your server opens the widget for one user at a time.

The widget never sees an API key. Your server mints a short-lived token for each user who opens it.

Get a key

Open API & SDK in the console and copy your key. Keep it on your server, in an environment variable. A key for real domains needs a plan.

Mint a token

curl -X POST https://api.customdomain.ai/v1/tokens \
  -H "Authorization: Bearer $CUSTOMDOMAIN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "application_id": "app_...", "domain": "app.customer.com" }'

The answer holds a token. Pass it to the widget in your page.

Done when the widget opens in your product with a token from your server.

More: Widget tokens and installing the widget.

Next: Set routing.

On this page