You need to make the curl URL request using your root login and the password you assigned, so instead of the --header option with ACCESS-TOKEN field to authenticate, to create the initial token you would need to put the username/password in the URL field, so:
obviously along with the remaining parameters prior to the url itself, just without the header time.
You will then get results back, like from the docs, showing something like:
and you can pull the token from the API reponse and then stop utilising the root login in the URL at this point forward and use the access-token which should have been created under the userid for
Remember, until you have an access-token you cannot user the --header field with an access-token. And since you can’t create it via the web interface, then you need to use a username/password in your API requests until that initial access-token exists.
The above url is an example, so you need to change “42” to whatever the userid is of your admin account. And the userid you can get also making an API query, but again, you have to provide username/password to check that as well until you create the access-token.