Brandcode Studio auth
brand_brandcode_authActivate a Brandcode Studio connection to save and push brands, with status, login, manual token, and logout modes for managing authentication.
Instructions
Activate Brandcode Studio connection for saving and pushing brands. Preferred mode: "activate" displays a short code (e.g. BRAND-7K4X) for the user to enter at brandcode.studio/activate — no copy-paste of tokens needed. Also supports: "status" (check auth), "login" (magic link fallback), "set_key" (manual token), "logout" (clear credentials). Use when the user wants to save their brand to Studio or says "activate", "connect to Brandcode", or "save my brand online". NOT needed for extraction, preview, or brand_check — those work without auth.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| key | No | Session token from magic link verification. Required when mode="set_key". Format: JWT from /api/auth/verify. | |
| mode | Yes | Auth action. "activate" (recommended) starts device code flow — displays a short code for the user to enter at brandcode.studio/activate, then polls for completion. No copy-paste needed. "status" checks if authenticated. "login" starts magic link flow (fallback). "set_key" stores token manually. "logout" removes credentials. | |
| No | Email address for login. Required when mode="login". | ||
| studio_url | No | Brandcode Studio base URL. Defaults to "https://www.brandcode.studio". Must be a trusted Studio origin; self-hosted/staging origins are added via the BRANDCODE_STUDIO_TRUSTED_ORIGINS environment variable. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| _metadata | Yes |