Apparently Microsoft is not alone when it comes to utterly retarded design decisions.
A few years ago when signing up for a Microsoft account I discovered that for some reason they enforce a maximum password lenght of 16 characters or something around that.
Well, InfluxDB not only does the same thing but also silently fails to create the user account when the password is considered too long.
Took me at least half an hour to figure out why this piece of trash kept vomiting {"error":"authorization failed"}.
Double checked my docker-compose file, curl parameters, read InfluxDB useless documentation which, of course, makes no mention of password lenght limits.

version: '2.4'


    container_name: influxdb
    image: influxdb
    restart: always
      - /opt/influxdb:/var/lib/influxdb
      - INFLUXDB_DB=db0
      - INFLUXDB_ADMIN_USER=username
      - INFLUXDB_ADMIN_PASSWORD=<short_password>
      - "8086:8086"
    mem_limit: 500M
    cpus: '1'

The last thing I tried before bashing my head against the screen was using a shorter password (~20 characters).
This fixed all my issues, InfluxDB started answering to my queries:

$ curl -G https://influxdb:8086/query -u username:<short_password> --data-urlencode "q=SHOW DATABASES"

I hope whoever made this retarded choice and didn’t even put a big yellow warning box in the documentation will suffer a violent death.