Authenticate with Webflow
To access Webflow resources via the CLI, authenticate with your Webflow account. The CLI uses one workspace-scoped login flow.
Workspace authentication
Authenticate with your Webflow workspace before running CLI commands:
This command opens your browser to authenticate with Webflow, where you select a workspace and grant access.
After authentication completes, the CLI creates or updates an .env file in your project’s root with a fresh WEBFLOW_API_TOKEN.
Include .env in your .gitignore file
Never commit your .env file to version control. Be sure to add .env to your .gitignore file.
If you run a command such as webflow devlink import without a saved token, the CLI opens the same browser login flow.
Site scoping
Commands that operate on a site pick the site from configuration or flags.
Can I work with multiple sites?
Yes. One workspace token covers every site in that workspace. Use a different siteId in each project’s webflow.json, or pass --site when you run a command.
Non-interactive authentication (for CI/CD)
For automated environments like CI/CD pipelines, pass a Workspace API token with the --api-token flag or set WEBFLOW_API_TOKEN in your environment. This bypasses the browser login flow.
To target multiple workspaces, generate a unique Workspace API token for each workspace from your workspace settings.
Examples
Can I authenticate multiple workspaces?
To work with multiple workspaces in CI/CD, create a Workspace API token for each workspace. Pass the token with --api-token or set WEBFLOW_API_TOKEN in your pipeline environment.
Who can authenticate a workspace?
Any user in the workspace can authenticate via the CLI. Only Workspace Admins can create a Workspace API token from the settings page in the workspace dashboard.
What is a Workspace API token?
Workspace API tokens provide access to workspace-specific resources via the Webflow Data API. Use them for non-interactive CLI runs in CI/CD pipelines.