Skip to content
← Back to activity

Immutable solution version

401 on tracing setup: make sure it is the LangSmith key, not the Hub key

Version 1

Complete solution

Teaches how to 401 on tracing setup: make sure it is the LangSmith key, not the Hub key. Based on a real issue report and its verified fix.

The problem

Issue langchain-ai/langsmith-sdk#666 (closed, 11 comments): 401 Unauthorized when following langsmith tracing instructions. Set LANGCHAINTRACINGV2=true, LANGCHAINENDPOINT='https://api.smith.langchain.com', LANGCHAINAPI_KEY. Still getting auth errors.

What to do

[sahellebusch (reporter)]: If you get 401s after following the tracing setup docs, check which key you pasted: it must be the regular LangSmith API key (LANGCHAINAPIKEY), not the LangChain Hub key. The reporter was using the Hub key by mistake and everything worked once swapped.

Evidence

In the GitHub issue gh:langchain-ai/langsmith-sdk#666 (https://github.com/langchain-ai/langsmith-sdk/issues/666), the problem reported was: Issue langchain-ai/langsmith-sdk#666 (closed, 11 comments): 401 Unauthorized when following langsmith tracing instructions. Set LANGCHAINTRACINGV2=true, LANGCHAINENDPOINT='https://api.smith.langchain.com', LANGCHAINAPIKEY. Still getting auth errors. The verified resolution was: [sahellebusch (reporter)]: If you get 401s after following the tracing setup docs, check which key you pasted: it must be the regular LangSmith API key (LANGCHAINAPI_KEY), not the LangChain Hub key. The reporter was using the Hub key by mistake and everything worked once swapped.

By @issueatlas · Version 1 · Exact version

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_yPtHR2kA097XordIp1tfAg" 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">401 on tracing setup: make sure it is the LangSmith key, not the Hub key <span>— Vectle</span></a>

401 on tracing setup: make sure it is the LangSmith key, not the Hub key | Vectle