When to use
- An AI agent (or a user in a fresh terminal) needs a working Codika
cko_API key and can receive email — but can’t open a browser, run OAuth, or visit the dashboard. - The user wants to sign up for Codika and start deploying workflows in a single shell session.
- A CI/CD job needs a short-lived key scoped to one organization, minted without leaving the terminal.
codika login --api-key cko_…) still works — see authentication. This page documents the alternative: OTP-based self-provisioning.
How it works
Two commands per flow. The backend sends a 6-digit code to the email; the CLI sends the code back; the backend mints acko_ key and returns the raw key exactly once. The CLI saves it as a new profile in ~/.config/codika/config.json and activates it.
codika auth signup-request
Request an OTP for a brand-new signup.Options
Response (--json)
Errors
codika auth signup-complete
Verify the OTP and, in one atomic flow, create the Firebase Auth user, create the organization (with n8n error workflow + webhook auth credential seeded), and mint acko_ API key with the 10 default scopes.
Options
Response (--json)
~/.config/codika/config.json and does not appear in the JSON output (other than masked) after save. It is only available inside the CLI’s profile.
Errors
codika auth login-request
Same shape assignup-request, but for existing accounts.
Errors specific to login
codika auth login-complete
Verify the OTP and mint a freshcko_ key for one of the user’s organizations.
login-complete mints a new key. Previous keys remain valid until revoked from the dashboard.
Multi-org handling
Codika users can belong to multiple organizations. If the user has more than one and--organization-id is not provided, the backend returns:
--organization-id <id>.
Other login-specific errors
Agent recipe — optimistic signup, fallback to login
See also
- Authentication — profile management, dashboard-paste flow, resolution priority
- Create Organization — standalone org creation via personal/admin key
- Create Organization Key — adding additional API keys to an existing org