Welcome to the Atlassian developer community @LeoMAREK,
As @asd confirmed, the problem isn’t your curl syntax. But what can be confusing is that all auth errors with basic auth pretty much respond the same way that passwords are deprecated. For example, when I use my correct username (my email address) and a purposefully bad API token (like abc123), then I get that error message. My advice is to revoke that API token and to create a new one in the API tokens section of your user profile. Perhaps there was a copy/paste error when you generated the first one?