Documentation

influxctl token create

The influxctl token create command creates a database token with specified permissions to resources in an InfluxDB Cloud Dedicated cluster and outputs the token string.

Store secure tokens in a secret store

Token strings are returned only on token creation. We recommend storing database tokens in a secure secret store.

Usage

influxctl token create \
  [--read-database=<DATABASE_NAME>] \
  [--write-database=<DATABASE_NAME>] \
  <TOKEN_DESCRIPTION>

Arguments

ArgumentDescription
TOKEN_DESCRIPTIONDatabase token description

Flags

FlagDescription
-h--helpOutput command help
--read-databaseGrant read permissions to a database
--write-databaseGrant write permissions to a database

Examples

Create a token with read and write access to a database
influxctl token create \
  --read-database mydb \
  --write-database mydb \
  "Read/write token for mydb"
Create a token with read-only access to a database
influxctl token create \
  --read-database mydb \
  "Read-only token for mydb"
Create a token with read-only access to multiple database
influxctl token create \
  --read-database mydb1 \
  --read-database mydb2 \
  "Read-only token for mydb1 and mydb2"
Create a token with mixed permissions on multiple database
influxctl token create \
  --read-database mydb1 \
  --read-database mydb2 \
  --write-database mydb2 \
  "Read-only on mydb1, Read/write on mydb2"

Was this page helpful?

Thank you for your feedback!


Introducing InfluxDB 3.0

The new core of InfluxDB built with Rust and Apache Arrow. Available today in InfluxDB Cloud Dedicated.

Learn more

State of the InfluxDB Cloud Serverless documentation

The new documentation for InfluxDB Cloud Serverless is a work in progress. We are adding new information and content almost daily. Thank you for your patience!

If there is specific information you’re looking for, please submit a documentation issue.