Create a token
Use the influxctl token create
command
to create a token that grants access to databases in your InfluxDB Cloud Dedicated cluster.
If you haven’t already, download and install the
influxctl
CLI.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
- Token permissions (read and write per database)
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
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!
Support and feedback
Thank you for being part of our community! We welcome and encourage your feedback and bug reports for InfluxDB and this documentation. To find support, use the following resources:
InfluxDB Cloud and InfluxDB Enterprise customers can contact InfluxData Support.