In this guide, we'll talk about how to authenticate using the Zeplin CLI.
CLI commands will automatically prompt you to authenticate if the command requires so, otherwise you can always use zeplin login
command to authenticate without taking any action. There are 3 ways to authenticate:
This is the default authentication flow.
- Run the following command on terminal.
zeplin login
By default, Zeplin CLI will open a browser window to use your existing Zeplin session. If you are not already logged into the web app, you will be asked to login using your Zeplin credentials or an SSO provider.
- The browser window should look like this, simply click on
Connect to Zeplin CLI
. - Now head back to the terminal and the CLI will automatically log you in. If it does not, you can always copy token shown on the authentication page and paste it to the terminal prompt to proceed.
Zeplin CLI can authenticate using an access token instead of your Zeplin credentials which makes it easier to integrate it into your CI workflow.
- Get a CLI access token from your Profile in Zeplin. If a CLI token already exists, you should first revoke the existing token and then generate a new one.
- Set the
ZEPLIN_ACCESS_TOKEN
environment variable in your CI pipeline.
To login using other methods, simply unset the environment variable.
You can also use your Zeplin username/password to authenticate.
- Run the following command on terminal.
zeplin login --no-browser
- Type in your username and password.
Run zeplin login
again to authenticate with another Zeplin account.
Please note that the default login flow will automatically use the existing Zeplin session on your browser. You should first login with the other account on the Web app or use the Authentication with credentials method to enter the other account's credentials.