Creating an API Key
- Sign in to Anaconda.
- Open the user dropdown menu and select Account Settings.
- Select the API Keys tab.
- Select Create API Key.
- Provide a unique name for your API key.
-
Choose permission levels for the scopes your key should include. You can select one or both of the following:
-
User resources: Provides access to the platform’s user-level APIs. Include this scope if you need to interact programmatically with projects, data, or other assets associated with your account.
This scope mirrors your platform permissions (except for any administrative controls).
- Platform channels: Authenticates your local conda client or automated build systems so they can use channels you have access to within Anaconda Platform. Include this scope if you need to install packages from channels hosted on your instance.
-
User resources: Provides access to the platform’s user-level APIs. Include this scope if you need to interact programmatically with projects, data, or other assets associated with your account.
-
Set an expiration date from the dropdown. API keys have a maximum lifespan of one year.
If you choose Custom, a calendar field appears. Use it to specify a date.
-
Select Create API Key. Save your newly generated API key in a secure location.
Alternatively, you can generate an API key by logging in at the command line using
anaconda-auth login.
Using API Keys
If your conda client runs as part of an automated process, such as a CI/CD pipeline, or if you are using conda within Docker builds on your desktop, configure them to use your local API key (generated when you logged in usinganaconda-auth) to authenticate conda using one of the following methods:
- Using an environment variable
- Using the keyring
- Docker
- Open Anaconda Prompt or Powershell (Terminal on macOS/Linux).
-
Set your API key as an environment variable: