I downloaded and installed influxDB 2. I tried influx bucket list --org paraqom --token MYTOKEN
in localhost:8086 , I managed to see list of bucket.
But when I tried the same command (influx bucket list --org paraqom --token MYTOKEN ) for influxdb that is in cloud https://us-east-1-1.aws.cloud2.influxdata.com/
I got this error message:
Error: failed to list buckets: 401 Unauthorized: unauthorized access
I am sure the token that I am using is right. How can I config the token?
I have token in API Token in GUI influxdb (https://us-east-1-1.aws.cloud2.influxdata.com/) and I used exactly that token in command: influx bucket list --org <org_name> --token <API_Token>
First delete the config in CLI and create a fresh token in UI and create the config in CLI with the syntax as below
influx config create --active \
-n config-name \
-u https://us-west-2-1.aws.cloud2.influxdata.com \
-t mySuP3rS3cr3tT0keN \
-o example-org
The organization name must be same in the config and UI.
Regards
Sudheer