Skip to content
Merged
42 changes: 30 additions & 12 deletions content/shared/influxdb3-get-started/setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -496,12 +496,10 @@ influxdb3 create token --admin
{{% /code-tab-content %}}
{{% code-tab-content %}}

{{% code-placeholders "CONTAINER_NAME" %}}
```bash
```bash { placeholders="CONTAINER_NAME" }
# With Docker — in a new terminal:
docker exec -it CONTAINER_NAME influxdb3 create token --admin
```
{{% /code-placeholders %}}

Replace {{% code-placeholder-key %}}`CONTAINER_NAME`{{% /code-placeholder-key %}} with the name of your running Docker container.

Expand Down Expand Up @@ -537,34 +535,54 @@ In your command, replace {{% code-placeholder-key %}}`YOUR_AUTH_TOKEN`{{% /code-
Set the `INFLUXDB3_AUTH_TOKEN` environment variable to have the CLI use your
token automatically:

{{% code-placeholders "YOUR_AUTH_TOKEN" %}}
```bash
{{< tabs-wrapper >}}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The tabs are now (incorrectly) nested. Separate into env var usage and CLI option usage.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed. The nested tabs structure has been removed. The documentation now uses two separate sequential sections instead:

  1. To have your token provided automatically, set the environment variable: (with OS-specific tabs)
  2. Include the --token option with CLI commands: (single example)

This matches the pattern used in the cloud-dedicated docs and provides better accessibility.

Commit: 23bce80

Updated documentation

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed. The nested tabs structure has been removed. The documentation now uses two separate sequential sections instead:

  1. To have your token provided automatically, set the environment variable: (with OS-specific tabs)
  2. Include the --token option with CLI commands: (single example)

This matches the pattern used in the cloud-dedicated docs and provides better accessibility.

Commit: 23bce80

Updated documentation

@copilot Both apply to CLI commands; you can't use environment variables with anything else.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated the headings to clarify that both methods are for CLI commands. The headings are now parallel and clearer:

  • Set an environment variable (recommended)
  • Use the --token option

Both are presented as methods to provide your token for influxdb3 CLI commands, as stated in the introductory text.

Commit: f6fe430

Updated headings

{{% tabs %}}
[macOS and Linux](#)
[PowerShell](#)
[CMD](#)
{{% /tabs %}}
{{% tab-content %}}

```bash { placeholders="YOUR_AUTH_TOKEN" }
export INFLUXDB3_AUTH_TOKEN=YOUR_AUTH_TOKEN
```
{{% /code-placeholders %}}

{{% /tab-content %}}
{{% tab-content %}}

```powershell { placeholders="YOUR_AUTH_TOKEN" }
$env:INFLUXDB3_AUTH_TOKEN = "YOUR_AUTH_TOKEN"
```

{{% /tab-content %}}
{{% tab-content %}}

```cmd { placeholders="YOUR_AUTH_TOKEN" }
set INFLUXDB3_AUTH_TOKEN=YOUR_AUTH_TOKEN
# Make sure to include a space character at the end of this command.
```

{{% /tab-content %}}
{{< /tabs-wrapper >}}

{{% /tab-content %}}
{{% tab-content %}}

Include the `--token` option with CLI commands:

{{% code-placeholders "YOUR_AUTH_TOKEN" %}}
```bash
```bash { placeholders="YOUR_AUTH_TOKEN" }
influxdb3 show databases --token YOUR_AUTH_TOKEN
```
{{% /code-placeholders %}}

{{% /tab-content %}}
{{< /tabs-wrapper >}}

For HTTP API requests, include your token in the `Authorization` header--for example:

{{% code-placeholders "YOUR_AUTH_TOKEN" %}}
```bash
```bash { placeholders="YOUR_AUTH_TOKEN" }
curl "http://{{< influxdb/host >}}/api/v3/configure/database" \
--header "Authorization: Bearer YOUR_AUTH_TOKEN"
```
{{% /code-placeholders %}}

#### Learn more about tokens and permissions

Expand Down