Error: missing_credentials
The request had no Bearer token, session cookie, or CLI token.
What it means
The DeviceSDK API rejected the request because it could not find any of the three accepted authentication mechanisms:
- A
Authorization: Bearer <token>header - used by the dashboard and by direct API consumers. - A session cookie set by the dashboard login flow.
- A
dsdk_*CLI token - issued bydevicesdk loginand stored at~/.devicesdk/credentials.json.
Common causes and fixes
- You're calling the API directly without an auth header. Add
Authorization: Bearer <token>. Get a token withdevicesdk login(writes to~/.devicesdk/credentials.json) or from your server's dashboard Tokens page. - You're running the CLI without logging in. Run
devicesdk login(the CLI auto-discovers your server via mDNS) and re-try. If mDNS isn't available on your network, rundevicesdk login --host http://<server>:8080. - No server is configured. The host comes from (in order)
DEVICESDK_API_URL, the--hostflag, the host saved in~/.devicesdk/credentials.json, or mDNS auto-discovery. If none resolves, log in first:devicesdk login. - Your script is running in CI without a token. Issue a token from your server's dashboard and set
DEVICESDK_TOKENon the CI runner (point it at your server withDEVICESDK_API_URL).
Related
invalid_token- the request did carry a token, but it didn't match any account.invalid_cli_token- same idea, scoped to CLI tokens.