How to use the API?

Supposedly there is an API at /api/v1/, but I can’t figure out how to access it.

I followed this thread to setup Kopia in container with web ui: Containerized Kopia server setup

So by this point I have an account with username: kopia@localhost and password: SuperSecretPassword. These credentials work when accessing the web ui.

When I do a GET request to /api/v1/sources, I get Missing credentials.

Using basic auth with username: kopia@localhost and password: SuperSecretPassword to do a GET request to the same url returns: Invalid or missing CSRF token.

If I do the same request with same credentials but instead to /api/v1/control/sources I get back a json object with this content:

{
	"code": "ACCESS_DENIED",
	"error": "access is denied"
}

What am I doing wrong? Or is API not working in container installation method?