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.
PS : influx config
Active Name URL Org
Thank you in advance for your help!
It is the problem with token. I think you have entered the wrong token. Enter the correct token in config creation and check
Thank you for your reply,
Here is what I am trying to launch:
influx config create --config-name Teams\
but even after this command, I get the same error. And when I look in the
cat ~/.influxdbv2/configs, the token part is filled.
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 assure you that the token is the right one, and despite that, it doesn’t work. I don’t understand why.
Hello, Did you get any resolution? I’m getting the same error when trying to setup Python.
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.
Has anyone figured out this issue yet?
Unfortunately I don’t have an answer for you I still haven’t been able to correct it.
Try the below syntax
influx config create --active \
-n config-name \
-u http://localhost:8086 \
-t mySuP3rS3cr3tT0keN \
It will work. Check the token also by refreshing it and match the tokens with UI and CLI