chroma-core/chroma · error · AuthError
Invalid credentials: Token not found}
Error message
Invalid credentials: Token not found}
What it means
AuthError raised in authenticate_or_raise when the token extracted from the request headers does not match any token in the server's token-to-user mapping. It fires on requests presenting an unknown, rotated, or misspelled token (note the stray '}' in the message is a formatting bug in the source).
Solutions
- Verify the client token matches one configured in the server's auth credentials file
- Re-add the token to the credentials YAML if it was rotated
- Check for trailing whitespace or encoding issues in the transmitted token
Defensive patterns
Strategy: try-catch
When it happens
Trigger: Thrown at chromadb/auth/token_authn/__init__.py:210 when the library encounters an invalid state.
Common situations: See trigger scenarios.
Understand the failure class
- Authentication and authorization failures — expired tokens, bad credentials, and missing scopes.
AI-assisted analysis of chroma-core/chroma@aecdd12c8a (2026-08-16).
Data as JSON: /api/errors/6a0841f85561a870.
Report an issue: GitHub.
Appendix: source
Thrown at chromadb/auth/token_authn/__init__.py:210
)
@override
def authenticate_or_raise(self, headers: Dict[str, str]) -> UserIdentity:
try:
if self._token_transport_header.value.lower() not in headers.keys():
raise AuthError(
f"Authorization header '{self._token_transport_header.value}' not found"
)
token = headers[self._token_transport_header.value.lower()]
if self._token_transport_header == TokenTransportHeader.AUTHORIZATION:
if not token.startswith("Bearer "):
raise AuthError("Bearer not found in Authorization header")
token = re.sub(r"^Bearer ", "", token)
token = token.strip()
_check_token(token)
if token not in self._token_user_mapping:
raise AuthError("Invalid credentials: Token not found}")
user_identity = UserIdentity(
user_id=self._token_user_mapping[token]["id"],
tenant=self._token_user_mapping[token]["tenant"],
databases=self._token_user_mapping[token]["databases"],
)
return user_identity
except AuthError as e:
logger.debug(
f"TokenAuthenticationServerProvider.authenticate failed: {repr(e)}"
)
except Exception as e:
tb = traceback.extract_tb(e.__traceback__)
# Get the last call stack
last_call_stack = tb[-1]
line_number = last_call_stack.lineno
filename = last_call_stack.filename
logger.debug(View on GitHub (pinned to aecdd12c8a)