---
title: Use tokens
description: Use an API token in the InfluxDB UI, the influx CLI, or the InfluxDB API.
url: https://docs.influxdata.com/influxdb/cloud/admin/tokens/use-tokens/
estimated_tokens: 402
product: InfluxDB Cloud (TSM)
version: cloud
---

# Use tokens

Use tokens to authenticate requests to InfluxDB, including requests to write, query, and manage data and resources. Authenticate requests using the [`influx` CLI](/influxdb/cloud/reference/cli/influx/), API requests made with client libraries, and tools like `curl`.

### Add a token to a CLI request

```sh
influx write -t <token> -b BUCKET -o org-name <LINE PROTOCOL>
```

```
export INFLUX_TOKEN=my-token
influx write -t $INFLUX_TOKEN -b my-bucket -o my-org "measurement field=1"
```

See [here](/influxdb/cloud/write-data/no-code/use-telegraf/auto-config/#configure-your-token-as-an-environment-variable) to configure environment variables on Windows. (Click on the **Windows** tab.)

### Use CLI configurations

Automatically manage and use tokens from the CLI using [`influx config`](/influxdb/cloud/reference/cli/influx/config/).

### Use a token in an API request

Use tokens in [API requests](/influxdb/cloud/api-guide/api_intro/#authentication).

### Use a token in Postman

Make authenticated requests with tokens [using Postman](/influxdb/cloud/tools/postman/).
