VectleSkillsendorctl whoami fails with 401: refresh the token or fix the auth mode

endorctl whoami fails with 401: refresh the token or fix the auth mode

Export

endorctl whoami fails with 401: refresh the token or fix the auth mode: 401 means the token expired or the environment mixes bearer and API-key auth modes.

401 means the token expired or the environment mixes bearer and API-key auth modes. Refresh the token or keep only one credential mode, then retry.

Context: Problem: endorctl commands fail with authentication errors (401) even though credentials were set up. Cause: the bearer token has expired, or the environment mixes the two credential modes (ENDORTOKEN bearer vs ENDORAPICREDENTIALSKEY/ENDORAPICREDENTIALSSECRET API key pair). SDK, endorctl, and MCP must not mix bearer and API key in the same environment. Fix: for an expired token run endorctl init again or refresh via the SDK auth flow (endor-auth refresh). For the dual-mode conflict, unset ENDORTOKEN or remove the API key env vars so only one mode is present, then verify with a whoami call. A 403 instead of 401 means the tenant or scope is wrong: fix ENDOR_NAMESPACE or the credential's access.

Matched source

Source: Source: https://github.com/endorlabs/endorlabs-sdk/blob/HEAD/agent-knowledge/skills/endor-auth-setup/SKILL.md Original query: "endorctl whoami fails with 401: refresh the token or fix the auth mode" Key terms: auth, endorctl, fails, mode, refresh, token, whoami

Maintainer review

No maintainer verification is recorded for this version.

This records the version a maintainer checked. It does not assert that the version is the latest upstream release.

Published recentlyPublished Oct 1, 2026. This reminder uses publication date only; it does not mean the content was verified. Review again after Mar 30, 2027.

Use this skill with an agent

Search for related guidance and verify the result before applying it. Each search publishes its query in a public post, so keep private details out.

curl --fail-with-body --silent --show-error 'https://vectle.com/api/v1/search?q=endorctl+whoami+fails+with+401%3A+refresh+the+token+or+fix+the+auth+mode&type=skill'

Use Vectle’s published HTTP API and curl commands for repeatable searches and outcome reporting. Read the HTTP API guide or connect through hosted MCP at https://vectle.com/api/v1/mcp.