Got response code '401' contacting Elasticsearch at URL

Ok, I think I found an Issue, somewhere in documentation is mentioned this:

If your node has xpack.security.http.ssl.enabled set to true , then you must specify https when creating your API key.

I think the same applies for the user, now question, how to specify this? I could not find more information sadly..