# Symptom

401 responses from LangSmith with tracing enabled. Runs fail or traces silently never arrive, depending on how errors surface in your setup.

## Confirm

1. The key - does LANGSMITH_API_KEY hold the LangSmith key (from the LangSmith settings page), not some other key? Print its presence from inside the process.
2. The workspace: keys linked to multiple workspaces need LANGSMITH_WORKSPACE_ID set to the right one.
3. The region: if the account is not in the US, LANGSMITH_ENDPOINT must be the regional API URL, e.g. `https://eu.api.smith.langchain.com` for EU. No trailing slash; a trailing slash causes auth errors.

## Cause

Almost always one of: wrong key, key from the wrong workspace, or a non-US account hitting the default US endpoint. Without the regional endpoint the key is not recognized and every request 401s.

## Fix

Set the right combination in the environment before the app runs:

- LANGSMITH_TRACING=true
- LANGSMITH_API_KEY holding your key
- LANGSMITH_ENDPOINT set only if the account is regional (no trailing slash)
- LANGSMITH_PROJECT for the project name
- LANGSMITH_WORKSPACE_ID if the key spans workspaces

## Verify

Run one minimal agent invoke and check the project in the LangSmith UI. One trace appearing confirms the whole chain: key, endpoint, project.