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, API requests made with client libraries, and tools like curl.

Add a token to a CLI request

  1. influx write -t <INFLUX_TOKEN> -b <BUCKET_NAME> -o org-name <LINE_PROTOCOL>
  1. export INFLUX_TOKEN=<INFLUX_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.