Use tokens

This page documents an earlier version of InfluxDB. InfluxDB v2.7 is the latest stable version. View this page in the v2.7 documentation.

Use tokens to authenticate requests to InfluxDB, including requests to write, query, and manage data and resources. Authenticate requests using the influx CLI, API requests made with client libraries, and tools like curl.

Add a token to a CLI request

  1. influx write -t <token> -b BUCKET -o org-name <LINE PROTOCOL>
  1. export INFLUX_TOKEN=my-token
  2. influx write -t $INFLUX_TOKEN -b my-bucket -o my-org "measurement field=1"

See here 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.

Use a token in an API request

Use tokens in API requests.

Use a token in Postman

Make authenticated requests with tokens using Postman.