> ## Documentation Index
> Fetch the complete documentation index at: https://docs.nokia.atlas.arenaphysica.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Authentication

> Authenticate with the Atlas API and CLI.

## Getting credentials

Contact your Atlas account team to receive access. You'll need your account credentials to log in.

## Installing the CLI

Run the install script:

```bash theme={null}
curl -fsSL https://regent.atlas.arena-ai.com/api/v1/cli/install.sh | bash
```

Then reload your shell:

```bash theme={null}
source ~/.zshrc   # or ~/.bashrc on Linux
```

The CLI is supported on macOS and Linux. Confirm the installation:

```bash theme={null}
atlas version
```

## CLI authentication

Configure the CLI with the Atlas server URL:

```bash theme={null}
atlas setup-url https://nokia.atlas.arenaphysica.com
```

Then authenticate:

```bash theme={null}
atlas login
```

This opens a browser window to complete authentication. Once finished, your token is saved to `~/.atlas/token` and the server URL to `~/.atlas/url`.

Export the token as an environment variable for use in API requests:

```bash theme={null}
export ATLAS_TOKEN=$(cat ~/.atlas/token)
```

To revoke credentials:

```bash theme={null}
atlas logout
```

Tokens are valid for 24 hours. Run `atlas login` again when yours expires.

### Environment variable overrides

You can override stored credentials with environment variables. These take precedence over values saved to `~/.atlas/`:

| Variable      | Description          |
| ------------- | -------------------- |
| `ATLAS_URL`   | Atlas server URL     |
| `ATLAS_TOKEN` | Authentication token |

## API authentication

All API requests require a Bearer token in the `Authorization` header:

```bash theme={null}
curl https://nokia.atlas.arenaphysica.com/api/v1/systems \
  -H "Authorization: Bearer <your-token>"
```

The token is the same credential saved by `atlas login`. You can retrieve it from `~/.atlas/token` or set it via the `ATLAS_TOKEN` environment variable.

<Note>
  All API requests must be made over HTTPS. Requests without a valid Bearer token return `401 Unauthorized`.
</Note>
