This message was deleted.
# rancher-desktop
a
This message was deleted.
b
How do I obtain a token?
h
I think you can access the container and retrieve the content: cat /var/lib/rancher/k3s/desktop/conf/token
f
I think the question is about the RD backend API, so the
$AUTH
credentials in the docs.
tbh, I don't know why the docs even mention
curl
, as
rdctl api
is just a wrapper that will provide the authentication automatically.
So
rdctl api /v1/settings
is the same (on macOS) as
Copy code
$ PASSWD=$(jq -r .password "$HOME/Library/Application Support/rancher-desktop/rd-engine.json")
$ curl -s --user "user:$PASSWD" <http://localhost:6107/v1/settings> -X GET
If you are making API calls from an app/plugin via an http library, then it makes sense to call directly instead of running
rdctl
as a subprocess. But from a shell script I would always use
rdctl api
instead of
curl
h
Awesome.