Logs in to your Wix account.
The following flags are available for the wix login command:
| Flag | Description |
|---|---|
--api-key <token> | Authenticate using an API key for automations and CI environments. |
Without the --api-key flag, wix login authorizes the CLI in a browser. The command displays a one-time code and waits while you confirm that code on the Wix login page, then completes on its own. Follow the instructions in the terminal.
If you're already logged in, wix login exits without asking you to authorize again. To switch accounts, run wix logout first.
The CLI can't open a browser for you when you work over SSH, in a container, or in a remote development environment. You can still authorize the CLI from a browser on another device, using the URL and code the command provides.
In a non-interactive terminal, such as an AI coding agent or an automated script, the command reports its progress as JSON instead of prompting you. Use --api-key to authenticate in these environments.
Every wix login method, with or without --api-key, calls manage.wix.com to authorize the CLI and verify your account. Later commands call www.wixapis.com to interact with a site. If you're running the CLI inside a sandboxed environment with a network egress allowlist, such as an AI agent's execution container, allow both hosts before logging in. --api-key removes the need for browser interaction, but it doesn't remove this network requirement. If manage.wix.com is unreachable, both login methods fail.
Last updated: 20 August 2026