Influx (2.x) List auth token

Viewed 3918

In the documentation from influxdb2 I got this for listing auth token, but with influx command line it's not showing anything

https://docs.influxdata.com/influxdb/v2.0/reference/cli/influx/auth/list/

View tokens using the influx CLI Use the influx auth list command to view tokens.

influx auth list

But I get :

~$ influx auth ls 
Error: Unauthorized access.
See 'influx auth list -h' for help

~$ influx auth ls -h
List authorizations

Usage:
  influx auth list [flags]

Aliases:
  list, find, ls

Flags:
  -c, --active-config string   Config name to use for command; Maps to env var $INFLUX_ACTIVE_CONFIG
      --configs-path string    Path to the influx CLI configurations; Maps to env var $INFLUX_CONFIGS_PATH (default "/home/phil/.influxdbv2/configs")
  -h, --help                   Help for the list command 
      --hide-headers           Hide the table headers; defaults false; Maps to env var $INFLUX_HIDE_HEADERS
      --host string            HTTP address of InfluxDB; Maps to env var $INFLUX_HOST
  -i, --id string              The authorization ID
      --json                   Output data as json; defaults false; Maps to env var $INFLUX_OUTPUT_JSON
  -o, --org string             The name of the organization; Maps to env var $INFLUX_ORG
      --org-id string          The ID of the organization; Maps to env var $INFLUX_ORG_ID
      --skip-verify            Skip TLS certificate chain and host name verification.
  -t, --token string           Authentication token; Maps to env var $INFLUX_TOKEN
  -u, --user string            The user
      --user-id string         The user ID

How do you list auth token with influx?

1 Answers

You have to supply a valid access token to use the command. Either the command will get it from your local environment (if you set it up) or you can specify it on the command line.

influx auth list -u username -t "VALIDACCESSTOKEN"
Related