diff --git a/livekit-api/livekit/api/access_token.py b/livekit-api/livekit/api/access_token.py index eb820fcc..d108c028 100644 --- a/livekit-api/livekit/api/access_token.py +++ b/livekit-api/livekit/api/access_token.py @@ -79,10 +79,10 @@ def __init__( api_secret: Optional[str] = None, ) -> None: if not api_key: - api_key = os.getenv("LIVEKIT_API_KEY", "") + api_key = os.getenv("LIVEKIT_API_KEY") if not api_secret: - api_secret = os.getenv("LIVEKIT_API_SECRET", "") + api_secret = os.getenv("LIVEKIT_API_SECRET") if not api_key or not api_secret: raise ValueError("api_key and api_secret must be set") @@ -151,10 +151,10 @@ def __init__( leeway: datetime.timedelta = DEFAULT_LEEWAY, ) -> None: if not api_key: - api_key = os.getenv("LIVEKIT_API_KEY", "") + api_key = os.getenv("LIVEKIT_API_KEY") if not api_secret: - api_secret = os.getenv("LIVEKIT_API_SECRET", "") + api_secret = os.getenv("LIVEKIT_API_SECRET") if not api_key or not api_secret: raise ValueError("api_key and api_secret must be set") diff --git a/livekit-api/livekit/api/livekit_api.py b/livekit-api/livekit/api/livekit_api.py index 4f0dfc1d..325d8d73 100644 --- a/livekit-api/livekit/api/livekit_api.py +++ b/livekit-api/livekit/api/livekit_api.py @@ -16,13 +16,13 @@ def __init__( timeout: float = 60, # 1 minutes by default ): if not url: - url = os.getenv("LIVEKIT_URL", "") + url = os.getenv("LIVEKIT_URL") if not api_key: - api_key = os.getenv("LIVEKIT_API_KEY", "") + api_key = os.getenv("LIVEKIT_API_KEY") if not api_secret: - api_secret = os.getenv("LIVEKIT_API_SECRET", "") + api_secret = os.getenv("LIVEKIT_API_SECRET") if not url: raise ValueError("url must be set")