Need to create a token to bypass 401 error, but when i try to create one i also get the 401 error

Version: 2.3

root@xili:/var/lib/influxdb# influx auth create --org my-org --all-access
Error: failed to lookup org with name “my-org”: 401 Unauthorized: unauthorized access

Create an API token in InfluxDB | InfluxDB Cloud Documentation

Freshly installed…

All commends need a token, the reason for my problem is that i want to create a root users (access to all dbs with all permissions)

But i can do whatever i want - doesn’t work!

Token needs a bucket, and a bucket needs a token? Sound like a circular dependency…

Create user → needs bucket, organisation
Create bucket-> needs tocken
Create organisation → needs token
Create Token → needs bucket, needs orgnisation

Seems 100% unsolveable i.m.o…?

root@xili:/var/lib/influxdb# influx auth list
Error: could not find authorization with given parameters: 401 Unauthorized: unauthorized access

root@xili:/var/lib/influxdb# curl http://localhost/api/v2/authorizations
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>404 Not Found</title>
</head><body>
<h1>Not Found</h1>
<p>The requested URL was not found on this server.</p>
<hr>
<address>Apache/2.4.25 (Debian) Server at localhost Port 80</address>
</body></html>
root@xili:/var/lib/influxdb# ^C
root@xili:/var/lib/influxdb# curl http://localhost/api/v2/authorizations
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>404 Not Found</title>
</head><body>
<h1>Not Found</h1>
<p>The requested URL was not found on this server.</p>
<hr>
<address>Apache/2.4.25 (Debian) Server at localhost Port 80</address>
</body></html>
root@xili:/var/lib/influxdb# ^C

Hello @ugvsffzawv,
Can you walk me through what you did to setup your InfluxDB instance?
Upon setting up your account, your admin token will automatically be generated.
You’ll need to grab that first (through the UI is easiest) and then configure your CLI config:

Thank you very much, not i’ve set a password on the InfluxDB 2.3 Web Gui… there i can see the token menu. Will look on it ASAP! :slight_smile:

But, in the manual, i NEVER SAW that i have to open the Web GUI in the browser first and then set the “root” account password an then get some tokens… They always write about some console things - not about Web GUI in the official InfluxDB manuals… that’s interesting i.m.o…