docs(auth): note that the Token Authorization scheme comes from Deepgram SDKs

This commit is contained in:
shrey kharbanda 2026-10-27 14:02:41 -07:00
parent b618285468
commit 784b1fdb01

View file

@ -1122,7 +1122,7 @@ def _should_route_jwt_to_oauth2_override(token: str, jwt_handler: JWTHandler) ->
def get_bearer_token(
api_key: str,
) -> str:
if api_key.startswith("Token "):
if api_key.startswith("Token "): # Deepgram SDKs send their key as `Token <key>`
return api_key[len("Token ") :]
if api_key.startswith("Bearer "): # ensure Bearer token passed in
api_key = api_key.replace("Bearer ", "") # extract the token