# Authentication

The ICA CLI uses an Illumina API Key to authenticate. An Illumina API Key can be acquired through the product dashboard after logging into a domain. See [API Keys](/connected-analytics/get-started/gs-getstarted.md#api-keys) for instructions to create an Illumina API Key.

Authenticate using `icav2 config set` command. The CLI will prompt for an `x-api-key` value. Input the API Key generated from the product dashboard here. See the example below (replace `EXAMPLE_API_KEY` with the actual API Key).

```bash
icav2 config set
Creating /Users/johngenome/.icav2/config.yaml
Initialize configuration settings [default]
server-url [ica.illumina.com]: 
x-api-key : EXAMPLE_API_KEY
output-format (allowed values table,yaml,json defaults to table) : 
colormode (allowed values none,dark,light defaults to none) :
```

The CLI will save the API Key to the config file as an encrypted value.

If you want to overwrite existing environment values, use the command `icav2 config set`.\
To remove an existing configuration/session file, use the command `icav2 config reset`.\\

Check the server and confirm you are authenticated using `icav2 config get`

```bash
icav2 config get
access-token: ""
colormode: none
output-format: table
server-url: ica.illumina.com
x-api-key: !!binary HASHED_EXAMPLE_API_KEY
```

If during these steps or in the future you need to reset the authentication, you can do so using the command: `icav2 config reset`


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://help.connected.illumina.com/connected-analytics/command-line-interface/cli-authentication.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
