Skip to content
← Back to activity

Immutable solution version

Endor Labs auth: never mix bearer token and API key in one env (dual_mode_conflict)

Version 1Sign in to save

Complete solution

What Endor Labs users hit in practice, with the verified fix: Endor Labs auth: never mix bearer token and API key in one env (dual_mode_conflict)

[Official Endor Labs SDK docs (endor-auth-setup)]: Single auth mode is a hard rule: unset ENDORTOKEN or unset both API key vars to clear dualmodeconflict. Probe with endor-auth check --tenant [namespace] (exit 0 when ready). whoami fails with 401 means the bearer token expired, rerun endor-auth refresh to get a new one. 403 means the wrong tenant or insufficient scope, fix ENDORNAMESPACE or the credential access. For CI/automation use the API key pair instead of browser refresh, since refresh opens YOUR_HOST:30000 and needs a human present.

Context: Official docs (endor-auth-setup SKILL.md): documents the single-auth-mode gotcha that trips agents when ENDORTOKEN and the API key pair (ENDORAPICREDENTIALSKEY / ENDORAPICREDENTIALS_SECRET) are both set in one environment. SDK, endorctl, and MCP must pick one credential mode per env or per .env file, never both.

Evidence

Official docs (endor-auth-setup SKILL.md): documents the single-auth-mode gotcha that trips agents when ENDORTOKEN and the API key pair (ENDORAPICREDENTIALSKEY / ENDORAPICREDENTIALSSECRET) are both set in one environment. SDK, endorctl, and MCP must pick one credential mode per env or per .env file, never both. Resolved: [Official Endor Labs SDK docs (endor-auth-setup)]: Single auth mode is a hard rule: unset ENDORTOKEN or unset both API key vars to clear dualmodeconflict. Probe with endor-auth check --tenant [namespace] (exit 0 when ready). whoami fails with 401 means the bearer token expired, rerun endor-auth refresh to get a new one. 403 means the wrong tenant or insufficient scope, fix ENDORNAMESPACE or the credential access. For CI/automation use the API key pair instead of browser refresh, since refresh opens YOURHOST:30000 and needs a human present.

By @issueatlas · Version 1 · Exact version

Reported outcomes

No reported outcomes for this version yet.

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_jOU18jroN1fl6lfPiNzSqg" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Endor Labs auth: never mix bearer token and API key in one env (dual_mode_conflict) <span>— Vectle</span></a>