fleebe
December 15, 2025, 10:24pm
1
Keep getting this error simply trying to access the list of projects.
langsmith.utils.LangSmithAuthError: Authentication failed for /sessions. HTTPError(‘401 Client Error: Unauthorized for url: https://api.smith.langchain.com/sessions?limit=100&offset=0’ , ‘{“detail”:“UUID header value was not a valid UUID”}’)
wfh
December 15, 2025, 10:27pm
2
Hello! Could you share an MRE for this?
And to confirm - this is the output of a call you are making from the LangSmith SDK? So it is related to the observability product rather than the Deployment product?
fleebe
December 15, 2025, 10:29pm
3
This line of code…
print(‘ ’ , len(list(client.list_projects())), ‘projects found’ )
wfh
December 15, 2025, 10:30pm
4
And how are you generating your api key?
And thanks for confirming. So indeed this would be better filed under observability & evals.
fleebe
December 15, 2025, 10:32pm
5
Using LangSmith
client = Client(api_key="lsv2_sk_
wfh
December 15, 2025, 10:39pm
6
Thanks! Tagging in someone from the langsmith team
How are you setting your api key for the client? the error makes me think it may not be set correctly
fleebe
December 15, 2025, 10:48pm
8
In python code like this
from langsmith import Client
client = Client(api_key="lsv2_sk_
and it is a env variable. in LANGCHAIN_API_KEY
can you try making a new key? i can’t seem to repro what you’re seeing with a valid key
fleebe
December 16, 2025, 1:44am
10
Made a new key.
Here is the code.
from langsmith import Client
client = Client(api_key=“lsv2_sk_” )
print(‘ ’ , len(list(client.list_projects())), ‘projects found’ )
This worked now. Created service key again for a workspace.
fleebe
December 16, 2025, 1:53am
11
Made a new key.
Here is the code.
from langsmith import Client
client = Client(api_key=“lsv2_sk_” )
print(‘ ’ , len(list(client.list_projects())), ‘projects found’ )
This worked now. Created service key again for a workspace.
Do not include an environment variable LANGCHAIN_WORKSPACE_ID=1