There are two ways to authenticate with the Zuplo Command Line Interface (CLI): using an API Key or via OAuth.
Using OAuth
The Zuplo CLI supports OAuth authentication. To authenticate using OAuth, run the following command:
Code
Your browser will open and prompt you to log in to your Zuplo account. After logging in, you will be redirected to a page that confirms your authentication. You can then return to your terminal, which will now be authenticated.
Using an API key
API key authentication is useful for CI/CD pipelines or other automated workflows where interactive login isn't feasible. See the following instructions to obtain and use an API key with the Zuplo CLI.
The API key is scoped to your account. So you can use the same one for all projects under the same account. If you are a member of multiple accounts, be sure to select the right one.
The Zuplo CLI uses API Keys to authenticate. You can find your API Key by following these steps:
- Navigate to portal.zuplo.com and log in.
- Select the account that you want to work on.
- Click the Settings tab and navigate to the "API Keys" section. Select an existing API Key or create a new one to use with the CLI.
Most commands take an --api-key argument. For example, to list your available
Zuplo API Gateways, run:
Code
If you don't want to pass your API Key to every command, you can set it as an environment variable:
Code