3

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?

2
  • The command is correct but you have to validate that you are authorized to use the command. Try use influx auth list -i YourUserId Commented Dec 16, 2020 at 14:28
  • 2
    I get the following answer when I try to list the auth with the admin id.:~$ influx auth list -i 06c6ed05975fc000 Error: Unauthorized access. See 'influx auth list -h' for help' ... I get the same result when I try to list user or create user. Commented Dec 17, 2020 at 10:17

2 Answers 2

4

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" 
Sign up to request clarification or add additional context in comments.

1 Comment

Before I had to do this: "sudo influx config create -n CONFIG_NAME -u localhost:8086 -p USERNAME:PASSWORD -o ORG" and then "sudo influx auth list -u USERNAME"
0

Try with below one

sudo influx auth ls 

3 Comments

I get: Error: could not find authorization with given parameters: 401 Unauthorized: unauthorized access
Try to use without sudo like influx auth ls
Do you have any token with access to read/auth?

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.