Documentation

Create a token

Use the influxctl token create command to create a token that grants access to databases in your InfluxDB Cloud Dedicated cluster.

  1. If you haven’t already, download and install the influxctl CLI.

  2. Run the influxctl token create command and provide the following:

    • Token permissions (read and write per database)
      • --read-database: Grant read permissions to a database
      • --write-database: Grant write permissions to a database
    • Token description
influxctl token create \
  --read-database <DATABASE_NAME> \
  --write-database <DATABASE_NAME> \
  <TOKEN_DESCRIPTION>

The command returns the token ID and the token string. This is the only time the token string is available in plain text.

InfluxDB might take some time to synchronize new tokens. If a new token doesn’t immediately work for querying or writing, wait a few seconds and try again.

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.

Example token creation commands

Create a token with read and write access to a database

Create a token with read-only access to a database

Create a token with read-only access to multiple database

Create a token with mixed permissions on multiple database

Tokens cannot be updated

Once created, token permissions cannot be updated. If you need a token with different permissions, create a new token with the appropriate permissions.


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.