I am currently experiencing a problem when accessing InfluxDB with a valid access token. Every time I try to use commands such as influx org list, I get a "401 Unauthorized" error.
Here is an example of a command I tried and the error I received:
$ influx org list
Error: failed to list orgs: 401 Unauthorized: unauthorized access
I have already done the initial configuration successfully using the influx config command. I have verified that the ~/.influxdbv2/configs configuration file contains the correct information.
I am open to any suggestions or advice on how to solve this problem. Please let me know if you need more information to help me find a solution.
Check the token in the config create and the token from where you have taken are both same version and matching. Then it will work. I also faced the same issue.
I am having the same issue - brand new all access token for InfluxDB (IOx), but attempting to use the token in any capacity results in a 401 Unauthorized. I have tried using it with the influx cli, telegraf and grafana and cannot get it to work correctly.
influx config create --active \
-n config-name \
-u http://localhost:8086 \
-t mySuP3rS3cr3tT0keN \
-o example-org
It will work. Check the token also by refreshing it and match the tokens with UI and CLI
Regards
Sudheer
Facing the same issue , I’m able to connect from my code but CLI keeps giving me an 401 Unauthorised access error. I have my token defined in a property file in my code but when I copy paste it to the command line it still fails. Influx is quite painful to use…