brand_brandcode_auth
Authenticate with Brandcode Studio to save and manage brands. Supports device code activation, login, status check, manual token, and logout.
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://brandcode.studio". Override for self-hosted instances. |